Accept pre-notarization block that matches
This commit is contained in:
@@ -3372,7 +3372,14 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta
|
|||||||
if (pcheckpoint && (nHeight < pcheckpoint->nHeight || nHeight == 1 && chainActive.Tip() != 0 && chainActive.Tip()->nHeight > 1) )
|
if (pcheckpoint && (nHeight < pcheckpoint->nHeight || nHeight == 1 && chainActive.Tip() != 0 && chainActive.Tip()->nHeight > 1) )
|
||||||
return state.DoS(100, error("%s: forked chain older than last checkpoint (height %d) vs %d", __func__, nHeight,pcheckpoint->nHeight));
|
return state.DoS(100, error("%s: forked chain older than last checkpoint (height %d) vs %d", __func__, nHeight,pcheckpoint->nHeight));
|
||||||
else if ( komodo_checkpoint(¬arized_height,nHeight,hash) < 0 )
|
else if ( komodo_checkpoint(¬arized_height,nHeight,hash) < 0 )
|
||||||
return state.DoS(100, error("%s: forked chain %d older than last notarized (height %d) vs %d", __func__,nHeight, notarized_height));
|
{
|
||||||
|
CBlockIndex *heightblock = chainActive[nHeight];
|
||||||
|
if ( heightblock != 0 && pblockindex->GetBlockHash() == hash )
|
||||||
|
{
|
||||||
|
fprintf(stderr,"got a pre notarization block that matches height.%d\n",(int32_t)nHeight);
|
||||||
|
return true;
|
||||||
|
} else return state.DoS(100, error("%s: forked chain %d older than last notarized (height %d) vs %d", __func__,nHeight, notarized_height));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Reject block.nVersion < 4 blocks
|
// Reject block.nVersion < 4 blocks
|
||||||
if (block.nVersion < 4)
|
if (block.nVersion < 4)
|
||||||
|
|||||||
Reference in New Issue
Block a user