Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: MyFarm on February 16, 2014, 01:48:19 PM



Title: How to reset wallet balance? Mine is wrong.
Post by: MyFarm on February 16, 2014, 01:48:19 PM
A few days ago when that bug was going around, my wallet balance became very skewed. I have 10 BTC pending that I never had and my actual balance is way off (in fact, I don't even know what my real balance is). This is the windows wallet. Is there a way I can get the wallet to reset/recheck the balances?

Thank you!


Title: Re: How to reset wallet balance? Mine is wrong.
Post by: Sydboy on February 16, 2014, 02:25:22 PM
Did the transfer show up in blockchain ? Have you got the ID ?
Did you take a backup recently ?

If you have a backup and the transfer does not show up you should be able to load the backup and run bitcoin with the -rescan option.


Title: Re: How to reset wallet balance? Mine is wrong.
Post by: MyFarm on February 16, 2014, 02:26:31 PM
It's not a matter of transactions not showing up, transactions showed up that I never should have received.  It's a ghost balance.


Title: Re: How to reset wallet balance? Mine is wrong.
Post by: DannyHamilton on February 16, 2014, 03:09:59 PM
It's not a matter of transactions not showing up, transactions showed up that I never should have received.  It's a ghost balance.

You didn't specifiy which wallet you are using. I'll assume you're using Bitcoin-Qt?

Option 1.
  • pywallet

Option 2.
  • zapwallet

Option 3.
  • dump private keys
  • start a new wallet.dat (after creating a safe backup of the current wallet.dat)
  • import private keys

Option 4.
  • import wallet.dat into blockchain.info
  • start a new wallet
  • send balance from blockchain.info to new wallet

Option 5.
  • Wait and see if the next version of Bitcoin-Qt cleans up the mess for you

There may be other options as well, these are just the 5 that immediately come to mind.


Title: Re: How to reset wallet balance? Mine is wrong.
Post by: leancuisine on February 16, 2014, 03:11:35 PM
You could also do a quick check to see what your current balance is by inserting your Bitcoin address after:

http://blockchain.info/address/


Title: Re: How to reset wallet balance? Mine is wrong.
Post by: DannyHamilton on February 16, 2014, 03:13:27 PM
You could also do a quick check to see what your current balance is by inserting your Bitcoin address after:

http://blockchain.info/address/

Which will not fix the problem, and which will only confuse you if you use multiple addresses in your wallet or have ever sent any bitcoins anywhere.

This just seems like useless advice at best and horrible advice at worst.


Title: Re: How to reset wallet balance? Mine is wrong.
Post by: Tbone123 on July 27, 2014, 08:33:23 PM
I dump private keys then imported private keys in a new wallet and it corrected my problem but is there a faster command than one address at a time? some type of convention like a comma between addresses or is that the limitation without going to pywallet or other program?


Title: Re: How to reset wallet balance? Mine is wrong.
Post by: btchris on July 27, 2014, 09:30:34 PM
First off, I wonder if running bitcoin with the -rescan option would help?

I dump private keys then imported private keys in a new wallet and it corrected my problem but is there a faster command than one address at a time? some type of convention like a comma between addresses or is that the limitation without going to pywallet or other program?

You can use the dumpwallet and importwallet RPC/debug window commands, e.g:

Code:
walletpassphrase "my-passphrase" 60
dumpwallet "c:\exportedkeys.txt

Code:
walletpassphrase "my-passphrase" 60
importwallet "c:\exportedkeys.txt"

Just be aware that the keys in the export file are not encrypted, so you should probably use sdelete (http://technet.microsoft.com/en-us/sysinternals/bb897443.aspx), shred (http://linux.die.net/man/1/shred), or similar to delete it once you're done.


Title: Re: How to reset wallet balance? Mine is wrong.
Post by: ThomasCrowne on July 28, 2014, 06:19:23 AM
bitcoin-qt -rescan

*give it a try if your are running it as your wallet


Title: Re: How to reset wallet balance? Mine is wrong.
Post by: AliceWonder on July 28, 2014, 07:22:47 AM
There also I believe is a recover-wallet option that might work.