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
  1. sipa commented at 2:22 pm on April 13, 2011: member
    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 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.
  2. sipa commented at 2:25 pm on April 13, 2011: member
    One thing I did not test, is the slowdown. Continuously creating CBlockLocator’s and writing them to wallet.dat may slow down initial block download.
  3. gavinandresen commented at 2:43 pm on April 13, 2011: contributor
    Nice! 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.
  4. sipa commented at 3:33 pm on April 13, 2011: member
    Ok, updated.
  5. gavinandresen commented at 4:07 pm on April 15, 2011: contributor
    Looking 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?
  6. 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.
    4f40b0922e
  7. sipa commented at 5:38 pm on April 17, 2011: member
    I 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.
  8. gavinandresen commented at 3:35 pm on April 20, 2011: contributor
    Pulled via cherry-pick.
  9. gavinandresen closed this on Apr 20, 2011

  10. dexX7 referenced this in commit fd39ee201f on Jul 29, 2015
  11. ptschip referenced this in commit 89de418155 on Nov 9, 2016
  12. destenson referenced this in commit 3679a8c02e on Nov 18, 2017
  13. lateminer referenced this in commit d6b4cdddf8 on Dec 9, 2017
  14. classesjack referenced this in commit dedd98b2c3 on Jan 2, 2018
  15. cryptapus referenced this in commit f11c553c13 on May 6, 2019
  16. attilaaf referenced this in commit 71f9eddb0d on Jan 13, 2020
  17. rajarshimaitra referenced this in commit d89ee86603 on Mar 23, 2021
  18. cryptapus referenced this in commit a8ad5a92fd on May 3, 2021
  19. 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 site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me