Skip to content

Commit

Permalink
update check + additional check for genesis block
Browse files Browse the repository at this point in the history
  • Loading branch information
ssd04 committed Feb 6, 2025
1 parent 8a3ca7a commit e5eb36a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion process/block/baseProcess.go
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ func (bp *baseProcessor) sortHeaderHashesForCurrentBlockByNonce(usedInBlock bool
}

func (bp *baseProcessor) hasMissingProof(headerInfo *hdrInfo, hdrHash string) bool {
isFlagEnabledForHeader := common.ShouldBlockHavePrevProof(headerInfo.hdr, bp.enableEpochsHandler, common.EquivalentMessagesFlag)
isFlagEnabledForHeader := bp.enableEpochsHandler.IsFlagEnabledInEpoch(common.EquivalentMessagesFlag, headerInfo.hdr.GetEpoch()) && headerInfo.hdr.GetNonce() > 1
if !isFlagEnabledForHeader {
return false
}
Expand Down
2 changes: 1 addition & 1 deletion process/block/metablock.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ func (mp *metaProcessor) ProcessBlock(
}

func (mp *metaProcessor) checkProofsForShardData(header *block.MetaBlock) error {
if !common.ShouldBlockHavePrevProof(header, mp.enableEpochsHandler, common.EquivalentMessagesFlag) {
if !(mp.enableEpochsHandler.IsFlagEnabledInEpoch(common.EquivalentMessagesFlag, header.Epoch) && header.GetNonce() > 1) {
return nil
}

Expand Down

0 comments on commit e5eb36a

Please sign in to comment.