mindiff exception for notaries

This commit is contained in:
jl777
2016-09-23 10:30:15 -03:00
parent 1e613927be
commit 50027f0631
10 changed files with 58 additions and 26 deletions

View File

@@ -304,9 +304,15 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
pindexNew->nStatus = diskindex.nStatus;
pindexNew->nTx = diskindex.nTx;
if (!CheckProofOfWork(pindexNew->GetBlockHash(), pindexNew->nBits, Params().GetConsensus()))
return error("LoadBlockIndex(): CheckProofOfWork failed: %s", pindexNew->ToString());
int32_t retval; uint32_t nBits;
nBits = pblock->nBits;
if ( (retval= komodo_blockcheck((void *)pindexNew,&nBits)) == 0 )
{
if (!CheckProofOfWork(pindexNew->GetBlockHash(), pindexNew->nBits, Params().GetConsensus()))
return error("LoadBlockIndex(): CheckProofOfWork failed: %s", pindexNew->ToString());
}
else if ( retval < 0 ) // komodo rejects, ie. prior to notarized blockhash
return(false);
pcursor->Next();
} else {
break; // if shutdown requested or finished loading block index