Add context check in connectTip
This commit is contained in:
@@ -3170,6 +3170,11 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
|
|||||||
//fprintf(stderr,"checkblock failure in connectblock futureblock.%d\n",futureblock);
|
//fprintf(stderr,"checkblock failure in connectblock futureblock.%d\n",futureblock);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if ( fCheckPOW != 0 && pindex->nTime > 1548979200 && !ContextualCheckBlock(block, state, pindex->pprev) ) // activate check Feb 1, 2019
|
||||||
|
{
|
||||||
|
fprintf(stderr,"ContextualCheckBlock failed ht.%d\n",(int32_t)pindex->GetHeight());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// verify that the view's current state corresponds to the previous block
|
// verify that the view's current state corresponds to the previous block
|
||||||
uint256 hashPrevBlock = pindex->pprev == NULL ? uint256() : pindex->pprev->GetBlockHash();
|
uint256 hashPrevBlock = pindex->pprev == NULL ? uint256() : pindex->pprev->GetBlockHash();
|
||||||
|
|||||||
Reference in New Issue
Block a user