Skip to content

Commit

Permalink
fixes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
AdoAdoAdo committed Jan 14, 2025
1 parent 828708c commit 747cd55
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion consensus/spos/bls/proxy/subroundsHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
3 changes: 0 additions & 3 deletions consensus/spos/bls/v2/subroundBlock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 1 addition & 8 deletions integrationTests/testProcessorNode.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion process/sync/baseForkDetector.go
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ func (bfd *baseForkDetector) processReceivedBlock(
}
bfd.setHighestNonceReceived(header.GetNonce())

if state == process.BHProposed || hasProof == false {
if state == process.BHProposed || !hasProof {
return
}

Expand Down

0 comments on commit 747cd55

Please sign in to comment.