diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-08-27 09:20:33 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-08-27 09:20:33 +0200 |
commit | 2e280311b87ac95a765edd3cac05096e48c73545 (patch) | |
tree | bfccbc856a40296f9d64566053604f91abc076c1 /src/rpcblockchain.cpp | |
parent | f30801afbde7598318a5b03de9812c58a6a34f33 (diff) |
Perform CVerifyDB on pcoinsdbview instead of pcoinsTip
Bypassing the main coins cache allows more thorough checking with the same
memory budget.
This has no effect on performance because everything ends up in the child
cache created by VerifyDB itself.
It has bugged me ever since #4675, which effectively reduced the
number of checked blocks to reduce peak memory usage.
- Pass the coinsview to use as argument to VerifyDB
- This also avoids that the first `pcoinsTip->Flush()` after VerifyDB
writes a large slew of unchanged coin records back to the database.
Diffstat (limited to 'src/rpcblockchain.cpp')
-rw-r--r-- | src/rpcblockchain.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index 58cab14045..b71d5a0804 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -430,7 +430,7 @@ Value verifychain(const Array& params, bool fHelp) if (params.size() > 1) nCheckDepth = params[1].get_int(); - return CVerifyDB().VerifyDB(nCheckLevel, nCheckDepth); + return CVerifyDB().VerifyDB(pcoinsTip, nCheckLevel, nCheckDepth); } Value getblockchaininfo(const Array& params, bool fHelp) |