Add -checklevel and improve -checkblocks
authorPieter Wuille <pieter.wuille@gmail.com>
Wed, 21 Mar 2012 22:08:13 +0000 (23:08 +0100)
committerPieter Wuille <pieter.wuille@gmail.com>
Thu, 22 Mar 2012 02:19:23 +0000 (03:19 +0100)
commit4538e45c46d3829a21aed7685e6fbac7e8aafad3
treebdf432390f1572463cb71332ad9ea6a2ddd80229
parent100da7367767e7fa360f48f07b7a20e9374fda84
Add -checklevel and improve -checkblocks

-checkblocks now takes a numeric argument: the number of blocks that must
be verified at the end of the chain. Default is 2500, and 0 means all
blocks.

-checklevel specifies how thorough the verification must be:
0: only check whether the block exists on disk
1: verify block validity (default)
2: verify transaction index validity
3: check transaction hashes
4: check whether spent txouts were spent within the main chain
5: check whether all prevouts are marked spent
6: check whether spent txouts were spent by a valid transaction that consumes them
src/db.cpp
src/init.cpp