Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: grue on April 16, 2012, 02:04:40 AM



Title: Re-Creating a wallet?
Post by: grue on April 16, 2012, 02:04:40 AM
tl;dr version: bitcoin 0.4.3 works fine, but 0.4.5 (http://luke.dashjr.org/programs/bitcoin/files/bitcoind/0.4.5/test/rc3/) fails. it says wallet is corrupt. is there a way to re-create my wallet so it works with 0.4.5?

verbose version:
I have been using bitcoin-wx since i got into bitcoin. Even after bitcoin-qt was released, i never upgraded, mainly because i don't like the qt layout (waste of space). Versions up to 0.4.3 works fine for me, but when i tried to upgrade to 0.4.4 and 0.4.5, i get this error message upon startup:
Code:
---------------------------
Bitcoin
---------------------------
Error loading wallet.dat: Wallet corrupted     

---------------------------
OK   
---------------------------
I have spoken to Luke-Jr about this issue, and he has offered to help, but i would rather not disclose my wallet.dat file (it contains some semi-sensitive transaction data). so i guess the only way is to reconstruct the wallet file. there is pywallet, but there's no way to mass import/export keys.


Title: Re: Re-Creating a wallet?
Post by: Pieter Wuille on April 16, 2012, 11:03:10 AM
Recent versions verify all wallet keys for consistency at load time, and fail rather than silently ignore it. You probably have one or a few inconsistent keys in your wallet file, which went undetected for a longer time.

I have a not-very-well-tested patch for bitcoind/bitcoin-qt that tries to reconstruct inconsistent keys, or otherwise ignores errors. It will not fix the wallet file, but it may be enough to access it.

Let me know if you're interested.


Title: Re: Re-Creating a wallet?
Post by: DeathAndTaxes on April 16, 2012, 12:55:44 PM
Another option would be to simply create a new empty wallet and then using older version of client transfer complete wallet balance to new wallet.