diff --git a/consensus/spos/bls/proxy/subroundsHandler.go b/consensus/spos/bls/proxy/subroundsHandler.go index d27ebb50d9..79cca8e04b 100644 --- a/consensus/spos/bls/proxy/subroundsHandler.go +++ b/consensus/spos/bls/proxy/subroundsHandler.go @@ -60,7 +60,7 @@ type SubroundsHandler struct { func (s *SubroundsHandler) EpochConfirmed(epoch uint32, _ uint64) { err := s.initSubroundsForEpoch(epoch) if err != nil { - log.Error("SubroundsHandler.EpochStartAction: cannot initialize subrounds", "error", err) + log.Error("SubroundsHandler.EpochConfirmed: cannot initialize subrounds", "error", err) } } diff --git a/consensus/spos/bls/v2/subroundBlock.go b/consensus/spos/bls/v2/subroundBlock.go index 3ff1459d66..a8982afdbe 100644 --- a/consensus/spos/bls/v2/subroundBlock.go +++ b/consensus/spos/bls/v2/subroundBlock.go @@ -406,10 +406,7 @@ func (sr *subroundBlock) saveProofForPreviousHeaderIfNeeded(header data.HeaderHa err = sr.EquivalentProofsPool().AddProof(proof) if err != nil { log.Debug("saveProofForPreviousHeaderIfNeeded: failed to add proof, %w", err) - return } - - return } // receivedBlockBody method is called when a block body is received through the block body channel diff --git a/integrationTests/testProcessorNode.go b/integrationTests/testProcessorNode.go index d71aa30aa7..7fe4a9d1ea 100644 --- a/integrationTests/testProcessorNode.go +++ b/integrationTests/testProcessorNode.go @@ -2822,14 +2822,7 @@ func (tpn *TestProcessorNode) setBlockSignatures(blockHeader data.HeaderHandler) return err } - if tpn.EnableEpochsHandler.IsFlagEnabledInEpoch(common.EquivalentMessagesFlag, blockHeader.GetEpoch()) { - - // first block after genesis does not have the previous proof, as well as first block after epoch change where the flag gets activated - shouldAddProof := blockHeader.GetNonce() > 1 && !common.IsEpochChangeBlockForFlagActivation(blockHeader, tpn.EnableEpochsHandler, common.EquivalentMessagesFlag) - if !shouldAddProof { - return nil - } - + if common.ShouldBlockHavePrevProof(blockHeader, tpn.EnableEpochsHandler, common.EquivalentMessagesFlag) { previousProof := &dataBlock.HeaderProof{ PubKeysBitmap: pubKeysBitmap, AggregatedSignature: sig, diff --git a/process/sync/baseForkDetector.go b/process/sync/baseForkDetector.go index 57c682e0aa..cfe0a67556 100644 --- a/process/sync/baseForkDetector.go +++ b/process/sync/baseForkDetector.go @@ -747,7 +747,7 @@ func (bfd *baseForkDetector) processReceivedBlock( } bfd.setHighestNonceReceived(header.GetNonce()) - if state == process.BHProposed || hasProof == false { + if state == process.BHProposed || !hasProof { return }