Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: papa_snurf on January 28, 2012, 09:42:30 AM



Title: Do I need to reload the whole bitcoin chain if I replace my wallet?
Post by: papa_snurf on January 28, 2012, 09:42:30 AM
I downloaded the chain, took my PC offline and replaced the default wallet by my real wallet. The real wallet is valid and I can see my real receiving addresses. However they are displaying a balance of 0.

I know that those receiving addresses contain coins because I can see them on the chain explorer.

I also know that my offline / locally stored btc chain must contain the corresponding transaction because the transaction was settled last month and I just finished downloading the chain.

I assume that the bitcoin client has to rescan the chain to find this particular address. My question is how do I force a rescan? Please don't tell me that i have to redownload the whole chain with this particular wallet. I keep my real wallet offline all the time.


Title: Re: Do I need to reload the whole bitcoin chain if I replace my wallet?
Post by: Revalin on January 28, 2012, 10:18:25 AM
Just run it with -rescan .  :)


Title: Re: Do I need to reload the whole bitcoin chain if I replace my wallet?
Post by: papa_snurf on January 28, 2012, 11:03:50 AM
Just run it with -rescan .  :)

Worked like a charm. Thanks.


Title: Re: Do I need to reload the whole bitcoin chain if I replace my wallet?
Post by: ensign_lee on February 20, 2012, 04:23:24 PM
I'm running into this same problem too. Where do you type -rescan?


Title: Re: Do I need to reload the whole bitcoin chain if I replace my wallet?
Post by: ensign_lee on February 20, 2012, 04:33:48 PM
I'm running into this same problem too. Where do you type -rescan?

Think I figured it out. You're supposed to go to the command line? cd\program files (x86)\bitcoin\bitcoin-qt -rescan ?

If so, hmm...I seem to have some bitcoins missing in cyberspace...


Title: Re: Do I need to reload the whole bitcoin chain if I replace my wallet?
Post by: Pieter Wuille on February 20, 2012, 07:01:08 PM
Since 0.3.21, -rescan is only necessary is exceptional cases.

You can swap your wallet.dat just fine without it.


Title: Re: Do I need to reload the whole bitcoin chain if I replace my wallet?
Post by: mila on February 20, 2012, 07:23:13 PM
Since 0.3.21, -rescan is only necessary is exceptional cases.

You can swap your wallet.dat just fine without it.

wallet.dat since a certain bitcoin version stores inside the info what is the last block it has seen
so it does rescan the rest of the blockchain on start.
but older wallets need the -rescan attribute
that's why I have two shortcuts, one with -rescan for such rare cases and then the normal client launch icon


Title: Re: Do I need to reload the whole bitcoin chain if I replace my wallet?
Post by: LoWang on February 28, 2012, 10:02:54 PM
I also had to do the rescan when I tried to send some BTC into a wallet which was created offline - by a bitcoin-qt which was installed on an offline pc. I put this file onto another computer connected to the internet and bitcoin-qt did not want to show the transaction until I did the rescan. It is pretty user unfriendly IMHO to have to use command line argument :o I don't understand why there cannot be some button or menu for this.


Title: Re: Do I need to reload the whole bitcoin chain if I replace my wallet?
Post by: Pieter Wuille on February 29, 2012, 02:50:13 PM
I also had to do the rescan when I tried to send some BTC into a wallet which was created offline - by a bitcoin-qt which was installed on an offline pc. I put this file onto another computer connected to the internet and bitcoin-qt did not want to show the transaction until I did the rescan. It is pretty user unfriendly IMHO to have to use command line argument :o I don't understand why there cannot be some button or menu for this.

If the wallet was created with bitcoin-qt (even offline), you would not need -rescan when loading it into another client. The transaction would only show up as soon as the client caught up with the block chain, though. Sure that wasn't the reason it didn't show up without -rescan?



Title: Re: Do I need to reload the whole bitcoin chain if I replace my wallet?
Post by: LoWang on March 01, 2012, 10:27:41 PM
You think it would not need and still it did! Anyway is it written somewhere? I don't think there is something about switching wallet on the official wiki. Too bad everybody here talks about multiple wallets but nobody clearly says how to do it :-\
And yes I am sure the block chain was downloaded. There was a progress bar for about 20minutes and increasing number of downloaded blocks and thehn the progress bar disappeared and the downloaded blocks was the current number of blocks. Also guys on IRC channel advised me to do a rescan. It worked almost immediatelly after running bitcoin-qt -rescan and I saw the transaction...
But there is a strange problem with my client which I think should not be related: it still says catching up and the arrows are rotating all the time even though the blocks number is current. And it is doing this on different machines as well. I might want to try downloading of the block chain once more, but I did it already and the arrows are still rotating ... Does not happen with litecoin wallet though...


Title: Re: Do I need to reload the whole bitcoin chain if I replace my wallet?
Post by: DublinBrian on April 15, 2012, 03:22:17 PM
Since 0.3.21, -rescan is only necessary is exceptional cases.

You can swap your wallet.dat just fine without it.
I dont think so.

I withdrew some BTC from MTGox to my Bitcoin 0.6.0 Windows client. When the client showed coins received I did not wait for confirmations. I immediately closed the client, and removed wallet.dat to my offline storage hard drive.

Two days later, I brought wallet.dat back to the client, but it shows the coins received but "unconfirmed". Blockexplorer.com shows 120 confirmations for my coins. But the client says the coins are not available for spending.

I tried reinstalling the client but still showing the coins as unconfirmed. I tried deleting the entire folder C:\users\myusername\appdata\roaming\Bitcoin, and then reinstalling and re-downloading the entire block chain. This took about 10 hours. But still coins shown as unconfirmed.

Finally the only thing that fixed the problem was running Bitcoin-qt.exe -rescan