dpow fix
This commit is contained in:
@@ -4250,10 +4250,10 @@ static bool ActivateBestChainStep(bool fSkipdpow, CValidationState &state, CBloc
|
|||||||
// stay on the same chain tip!
|
// stay on the same chain tip!
|
||||||
int32_t notarizedht,prevMoMheight; uint256 notarizedhash,txid;
|
int32_t notarizedht,prevMoMheight; uint256 notarizedhash,txid;
|
||||||
notarizedht = komodo_notarized_height(&prevMoMheight,¬arizedhash,&txid);
|
notarizedht = komodo_notarized_height(&prevMoMheight,¬arizedhash,&txid);
|
||||||
if ( !fSkipdpow && pindexFork != 0 && pindexFork->GetHeight() < notarizedht )
|
if ( !fSkipdpow && pindexFork != 0 && pindexOldTip->GetHeight() > notarizedht && pindexFork->GetHeight() < notarizedht )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"pindexFork->GetHeight().%d is < notarizedht %d, so ignore it\n",(int32_t)pindexFork->GetHeight(),notarizedht);
|
fprintf(stderr,"pindexOldTip->GetHeight().%d > notarizedht %d && pindexFork->GetHeight().%d is < notarizedht %d, so ignore it\n",(int32_t)pindexFork->GetHeight(),notarizedht,(int32_t)pindexOldTip->GetHeight(),notarizedht);
|
||||||
return state.DoS(100, error("ActivateBestChainStep(): pindexFork->GetHeight().%d is < notarizedht %d, so ignore it",(int32_t)pindexFork->GetHeight(),notarizedht),
|
return state.DoS(100, error("ActivateBestChainStep(): pindexOldTip->GetHeight().%d > notarizedht %d && pindexFork->GetHeight().%d is < notarizedht %d, so ignore it",(int32_t)pindexFork->GetHeight(),notarizedht,(int32_t)pindexOldTip->GetHeight(),notarizedht),
|
||||||
REJECT_INVALID, "past-notarized-height");
|
REJECT_INVALID, "past-notarized-height");
|
||||||
}
|
}
|
||||||
// - On ChainDB initialization, pindexOldTip will be null, so there are no removable blocks.
|
// - On ChainDB initialization, pindexOldTip will be null, so there are no removable blocks.
|
||||||
|
|||||||
Reference in New Issue
Block a user