This ensures to redo rescan, in case of an incomplete rescan.
[Wallet] Call SetBestChain before and after rescan #4800
pull cozz wants to merge 1 commits into bitcoin:master from cozz:cozz12 changing 2 files +2 −2-
cozz commented at 4:50 PM on August 31, 2014: contributor
-
[Wallet] Call SetBestChain before and after rescan 78b06205d3
-
BitcoinPullTester commented at 5:05 PM on August 31, 2014: none
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4800_78b06205d3b12873937aaf178594bc622ceaaed8/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
- laanwj added the label GUI on Sep 1, 2014
- laanwj added the label Wallet on Sep 1, 2014
- laanwj removed the label GUI on Sep 1, 2014
-
TheBlueMatt commented at 10:47 PM on September 2, 2014: member
Why? If I start a rescan, bitcoin-qt finds the tx I was missing and then I quit it, I dont expect it to continue to rescan, I expect it to restart into normal mode.
-
cozz commented at 11:36 PM on September 2, 2014: contributor
The software does a rescan, when it believes the balance shown to user could be wrong, because some transactions may be missing. This means, if we crash while rescanning, the balance and transactions can be in a wrong state, thus we need to ensure a complete rescan.
Now, for expert-users, we could introduce a 'rescan=0' to force not to continue rescan. Or we could only continue, if it was a forced rescan, and not if it was a voluntary rescan.
-
cozz commented at 11:56 PM on September 2, 2014: contributor
After thinking, this basically only affects the import-functions importwallet etc. So there is the bug, when someone imports a wallet and then we crash while rescanning. So maybe the better solution is to only call SetBestChain in the import-functions.
-
cozz commented at 12:40 AM on September 3, 2014: contributor
Closing this. Initially I thought, we would not continue rescan, in case someone loads a wallet-backup and crashes while rescanning. But this is not the case. And for the import-functions someone is probably smart enough to redo, in case his machine dies while the operation.
- cozz closed this on Sep 3, 2014
- MarcoFalke locked this on Sep 8, 2021