Skip to content

Conversation

@sipa
Copy link
Member

@sipa sipa commented May 22, 2013

Write bestblock records in wallets:

  • Every 20160 blocks synced, no matter what (before: none during IBD)
  • Every 144 blocks after IBD (before: for every block, slow)
  • When creating a new wallet (new)
  • At shutdown (new)

This should result in far fewer spurious rescans.

To correct all previously missed rescans, we should probably also once change the bestblock record name (suggested by gmaxwell), to force a single rescan once for every wallet. As this is likely to be annoying for almost all, and most that have missed funds in the past have already done a full rescan already, this is perhaps controversial and not included in this pullreq.

Should close #2676 (but I haven't tested that).

Write bestblock records in wallets:
* Every 20160 blocks synced, no matter what (before: none during IBD)
* Every 144 blocks after IBD (before: for every block, slow)
* When creating a new wallet
* At shutdown

This should result in far fewer spurious rescans.
@gmaxwell
Copy link
Contributor

Mostly I think it's essential that we do a release with a forced rescan prior to doing a release that supports turning on pruning that will make rescans infeasible (or at least a slow network traffic generating event).

@BitcoinPullTester
Copy link

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/95c7db3dbf4012dd02e5f1f30e6d982341facaa6 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.

@gavinandresen
Copy link
Contributor

ACK.

Synced testnet chain while watching bestblock record in wallet.dat, it changed at the right times.

@gmaxwell
Copy link
Contributor

ACK.

In valgrind, tried three different wallets, including old ones with no bestblock record and a empty one. Tested starts and stops, and a reindex. Looks okay and does not rescan on a new wallet.

gmaxwell added a commit that referenced this pull request May 22, 2013
More bestblock records in wallets
@gmaxwell gmaxwell merged commit 95c2ba1 into bitcoin:master May 22, 2013
laudney pushed a commit to reddcoin-project/reddcoin-3.10 that referenced this pull request Mar 19, 2014
More bestblock records in wallets
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0.8.2rc rescans wallet on startup even if wallet was just created

4 participants