Arsenal (OP)
Newbie
Offline
Activity: 7
Merit: 0
|
|
May 03, 2011, 10:08:08 PM |
|
Someone told me that if I decrypt my wallet.dat and put it back in its original location that the BTC balance the client says could differ from the useable number of BTC in that wallet.dat unless I use -rescan or redownload the entire block chain.
My questions are: 1. After I use -rescan would there be any situation where the client would display a balance different from the number of BTC I could actually spend/use? 2. How long does -rescan take or is there a way to display its progress other than watching the LED's on the front of my case? 3. Is there anyway to know if my current downloaded blockchain is corrupted or incorrect in any way? 4. Is there any reason not to start bitcoin with -rescan?
Thanks.
|
|
|
|
|
|
|
|
"Bitcoin: mining our own business since 2009" -- Pieter Wuille
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
BitterTea
|
|
May 03, 2011, 10:10:06 PM |
|
You may not need to use -rescan anymore. As of the latest version (0.3.21, I think) the client stores the index of the last scanned block in the wallet. Once the client starts (or is it before?), it will automatically rescan all block after the stored index, finding any transactions not already in the wallet.
|
|
|
|
theymos
Administrator
Legendary
Offline
Activity: 5194
Merit: 12972
|
|
May 04, 2011, 02:26:53 AM |
|
-rescan is apparently broken for 0-confirmation transactions. In cases where a 0-confirmation transaction gets stuck, you'll have to delete the block database files. It'll be obvious when this happens.
|
1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
|
|
|
BitterTea
|
|
May 04, 2011, 03:16:19 AM |
|
Yep, I've had that happen a few times. Probably because I was switching between wallets so running with -rescan all the time.
|
|
|
|
Pieter Wuille
Legendary
Offline
Activity: 1072
Merit: 1174
|
|
May 05, 2011, 12:36:45 PM |
|
-rescan is apparently broken for 0-confirmation transactions. In cases where a 0-confirmation transaction gets stuck, you'll have to delete the block database files. It'll be obvious when this happens.
Rescan is for searching the block chain for transactions that are from or to one of your addresses. A 0-confirmation transaction is one that never made it into the block chain. This could be because it was never transmitted, because it was ignored by miners for a while, or because it conflicts somehow with other transactions. If deleting and redownloading the block chain does make a difference, there is something seriously wrong, and we have a bug to fix.
|
I do Bitcoin stuff.
|
|
|
theymos
Administrator
Legendary
Offline
Activity: 5194
Merit: 12972
|
|
May 05, 2011, 12:40:42 PM |
|
If deleting and redownloading the block chain does make a difference, there is something seriously wrong, and we have a bug to fix.
That's what I mean. Once a transaction gets stuck at 0 confirmations (in the block chain, but not detected by the client), deleting the block database will help, but -rescan won't. I haven't had this happen to me, but I've read several cases of it on the forum.
|
1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
|
|
|
AvL42
|
|
October 07, 2012, 03:07:02 PM |
|
While this topic is a bit aged, I hope that someone still "watches" it...
It's not clear to me, what -rescan actually does: Does it scan the local copy of the blockchain in order to update any wrong/missing transactions in the wallet, or does it verify the local copy of the blockchain itself through the net?
I've got some transactions in the wallet that were never confirmed, and the bitcoin client doesn't ever seem to "forget" about them, nor allow me to manually purge them.
Since the transactions were never confirmed, I don't expect my local blockchain to be wrong with respect to these transactions, so wouldn't want to risk wasting almost 4GB extra traffic.
Is -rescan the right tool for my problem, or is there some tool to purge table-lines from the wallet.dat at the command-line(linux), or is calling dumpprivkey on all my addresses, then removing the wallet and importprivkey'ing them into the new wallet the only way to fix it?
|
|
|
|
Pieter Wuille
Legendary
Offline
Activity: 1072
Merit: 1174
|
|
October 07, 2012, 03:08:29 PM |
|
-rescan scans the local block chain copy for transactions that are missing from the wallet.
It does not remove transactions from the wallet which are in conflict with it.
|
I do Bitcoin stuff.
|
|
|
nomnomnom
|
|
October 07, 2012, 10:18:12 PM |
|
Hello, I've got some transactions in the wallet that were never confirmed, and the bitcoin client doesn't ever seem to "forget" about them, nor allow me to manually purge them.
one time I fixed a wallet like this, by deleting all transactions with pywallet ( https://github.com/jackjack-jj/pywallet) Start it with the --web option then scroll down to delete keys, select tx and type all. Afterwards start bitcoin with the -rescan option. But please make backups first in case something goes wrong. Related thread: https://bitcointalk.org/index.php?topic=105041.0
|
|
|
|
Werner
Member
Offline
Activity: 107
Merit: 10
|
|
October 08, 2012, 07:07:45 AM |
|
just learned that rescan aso can fix my problem. thank!
|
|
|
|
|