Just deleted tx's through pywallet, done bitcoin -rescan and balance shows 0 confirmed and 0 unconfirmed.
I have no idea what is going on but I hope I haven't just watched $19k go down the drain.
If you have your original wallet.dat backup containing the keys to spend your bitcoins, and haven't forgotten the password, then your money is always recoverable and spendable. What we are doing is attempting to remove the "reservation" of coins your wallet thinks you spent, but have never been included in a block.
The -rescan command looks through all blocks you have downloaded one-by-one to update your balance, adding payments to you and deducting payments you have sent. What you should see after a rescan is that the transactions tab shows all transactions this wallet has ever made, but with the unconfirmed ones removed.
Bitcoin-Qt needs to have completed downloading all blocks before you will see an accurate balance though. You should have the "up-to-date" checkmark in the lower right of your client before wondering WTF.
If pywallet seemed to operate normally, there are a few things that may have gone wrong:
- the rescan option might not have been called correctly (it needs a single hyphen for -rescan when you type it), this must launch a new copy of Bitcoin (it wasn't already running), and you should see the rescan dialog take considerable time when Bitcoin starts.
- was Bitcoin running when you ran pywallet? Bitcoin must be completely closed before anything accesses wallet.dat or you attempt to make a backup. In options, be sure "Start Bitcoin on system login", "minimize on close", and "minimize to the tray" (or whatever equivalent OSX options there are) are unchecked, and restart your computer to be sure Bitcoin-Qt is absolutely not running,
- pywallet didn't do what it was supposed to. Perhaps berkeley database libs were the wrong version or not installed correctly, or other unanticipated problems,
- you are not starting Bitcoin under your user name from the command prompt, which would create a new wallet for whatever user that was (root, etc),
- you didn't run pywallet under your username. File permissions or ownership may be incorrect, or it didn't find your wallet or save changes correctly,
- OSX Bitcoin-qt client is known for having blockchain database problems more often than it should (some bug that hasn't been identified yet), this could have happened coincidentally, making your blockchain or it's index un-scannable.
If you are sure the rescan was performed, looks like we need to try again.
I would rename the non-working wallet.dat, and restore your wallet.dat backup (which, for that much in BTC, it should be backed up in multiple places) to the ~/.bitcoin data directory. Everything should be like it was before when you run Bitcoin, including your unconfirmed transactions, confirming that your coins are still there and your backup is good.
Then meticulously follow the remove-transaction steps again, with a restart first to be sure Bitcoin isn't locking the wallet file. The file names in the pywallet "delete" tab are filled in correctly on most operating systems, but be sure they reference the correct full home directory path with your user name.
If you really need wallet recovery, I could do this for you, but would have you phone call me personally to communicate a strong password to 7zip up your wallet backup when sending it, etc. It would take about 5 minutes since I already have pywallet working. I could send send back the balance-restored original wallet.dat, or transfer all bitcoins to a brand new wallet you create and we pre-verify with test transactions is working 100%.
Edit: see that you got money transferred out of wallet.