-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
printf("LoadBlockIndex(): *** found bad spend at %d, hashBlock=%s, hashTx=%s\n",pindex->nHeight,pindex->GetBlockHash().ToString().c_str(),hashTx.ToString().c_str());
pindexFork=pindex->pprev;
}
// check level 6: check whether spent txouts were spent by a valid transaction that consume them
if(nCheckLevel>5)
{
CTransactiontxSpend;
if(!txSpend.ReadFromDisk(txpos))
{
printf("LoadBlockIndex(): *** cannot read spending transaction of %s:%i from disk\n",hashTx.ToString().c_str(),nOutput);
pindexFork=pindex->pprev;
}
elseif(!txSpend.CheckTransaction())
{
printf("LoadBlockIndex(): *** spending transaction of %s:%i is invalid\n",hashTx.ToString().c_str(),nOutput);