Automatically rescan after restoring wallet.dat #152
pull sipa wants to merge 1 commits into bitcoin:master from sipa:autorescan changing 3 files +33 −1-
sipa commented at 2:22 pm on April 13, 2011: memberInformation about the best known chain is added to wallet.dat. If this information does not match the data in blkindex.dat, a rescan is automatically performed at startup, starting from the the last known block. When upgrading from a wallet which does not have this information, no rescan is done automatically.
-
sipa commented at 2:25 pm on April 13, 2011: memberOne thing I did not test, is the slowdown. Continuously creating CBlockLocator’s and writing them to wallet.dat may slow down initial block download.
-
gavinandresen commented at 2:43 pm on April 13, 2011: contributorNice! RE: block download speed: I’d suggest a check for if IsInitialBlockDownload() and don’t bother writing best-block-index during the initial block download.
-
sipa commented at 3:33 pm on April 13, 2011: memberOk, updated.
-
gavinandresen commented at 4:07 pm on April 15, 2011: contributorLooking at this again and thinking about pulling, it seems more complicated than it needs to be– CBlockLocator can already serialize/deserialize itself, is there a reason for the ReadBestBlock/WriteBestBlock methods? Why not just Read/Write the CBlockLocator instead of CBLockLocator.vHave?
-
4f40b0922e
Automatically rescan after restoring wallet.dat
Information about the best known chain is added to wallet.dat. If this information does not match the data in blkindex.dat, a rescan is automatically performed, starting from the the last known block. When upgrading from a wallet which does not have this information, no rescan is done automatically.
-
sipa commented at 5:38 pm on April 17, 2011: memberI didn’t realize db.h did define classes from main.h as well, to use them. I added CBlockLocator to those and simplified the patch.
-
gavinandresen commented at 3:35 pm on April 20, 2011: contributorPulled via cherry-pick.
-
gavinandresen closed this on Apr 20, 2011
-
dexX7 referenced this in commit fd39ee201f on Jul 29, 2015
-
ptschip referenced this in commit 89de418155 on Nov 9, 2016
-
destenson referenced this in commit 3679a8c02e on Nov 18, 2017
-
lateminer referenced this in commit d6b4cdddf8 on Dec 9, 2017
-
classesjack referenced this in commit dedd98b2c3 on Jan 2, 2018
-
cryptapus referenced this in commit f11c553c13 on May 6, 2019
-
attilaaf referenced this in commit 71f9eddb0d on Jan 13, 2020
-
rajarshimaitra referenced this in commit d89ee86603 on Mar 23, 2021
-
cryptapus referenced this in commit a8ad5a92fd on May 3, 2021
-
DrahtBot locked this on Sep 8, 2021
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-01-08 03:13 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-01-08 03:13 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me