diff options
| author | Pieter Wuille <[email protected]> | 2013-05-22 20:58:53 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2013-05-22 20:59:36 +0200 |
| commit | 95c7db3dbf4012dd02e5f1f30e6d982341facaa6 (patch) | |
| tree | b5148e78e2e84eeb4c337b4db5755bf34ca0dc8b /src/main.cpp | |
| parent | Merge pull request #2677 from sipa/fastcreate (diff) | |
| download | discoin-95c7db3dbf4012dd02e5f1f30e6d982341facaa6.tar.xz discoin-95c7db3dbf4012dd02e5f1f30e6d982341facaa6.zip | |
More bestblock records in wallets
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.
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 2d22541ba..b7efac53b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1870,7 +1870,7 @@ bool SetBestChain(CValidationState &state, CBlockIndex* pindexNew) } // Update best block in wallet (so we can detect restored wallets) - if (!fIsInitialDownload) + if ((pindexNew->nHeight % 20160) == 0 || (!fIsInitialDownload && (pindexNew->nHeight % 144) == 0)) { const CBlockLocator locator(pindexNew); ::SetBestChain(locator); |