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 (only read by the child cache) back to the database.
For comparison:
Without:
2014-08-27 07:18:09 No coin database inconsistencies in last 148 blocks (61620 transactions)
With:
2014-08-27 07:12:28 No coin database inconsistencies in last 262 blocks (101764 transactions)
(both started with default arguments to check 282 blocks, this log message reports the actual number of blocks checked at level 3)