I am posting this just in case it happens to someone else. I have had my iPhone 3gs jailbroken for a week now, and everything was perfect. However, I think something I installed from cydia cause my wifi to stop working and it bugged the hell out of me. I googled it and everyone said to go to your iPhone settings and reset network settings. Well, surprise surprise, that didnt work for me. I eventually read that you could delete all settings and data and it would work, so I tried that and it fucked my phone up. It would not turn on to the home screen and the blackrain jailbreak would freeze. I tried using itunes to restore my iPhone and it failed and gave some error message. I restarted the computer and plugged the phone into a different usb port and it worked.
sparknotes:
if itunes fails to restore your iphone, try using a different usb port. it worked for me and ive read it has worked for others.