Skip to content

Commit f1c4666

Browse files
committed
Refactor ResendFinalizationRequest signature
Signed-off-by: Yacov Manevich <yacov.manevich@avalabs.org>
1 parent 688ad3f commit f1c4666

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

epoch.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,11 +2031,7 @@ func (e *Epoch) createFinalizedBlockVerificationTask(block Block, finalization *
20312031
if err != nil {
20322032
e.Logger.Debug("Failed verifying block", zap.Error(err))
20332033
// if we fail to verify the block, we re-add to request timeout
2034-
err = e.replicationState.ResendFinalizationRequest(md.Seq, finalization.QC.Signers())
2035-
if err != nil {
2036-
e.haltedError = err
2037-
e.Logger.Debug("Failed to resend finalization", zap.Error(err))
2038-
}
2034+
e.replicationState.ResendFinalizationRequest(md.Seq, finalization.QC.Signers())
20392035
return md.Digest
20402036
}
20412037

replication_state.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ func (r *ReplicationState) ReceivedFutureRound(round, seq, currentRound uint64,
222222
}
223223

224224
// ResendFinalizationRequest notifies the replication state that `seq` should be re-requested.
225-
func (r *ReplicationState) ResendFinalizationRequest(seq uint64, signers []NodeID) error {
225+
func (r *ReplicationState) ResendFinalizationRequest(seq uint64, signers []NodeID) {
226226
if !r.enabled {
227-
return nil
227+
return
228228
}
229229

230230
signers = NodeIDs(signers).Remove(r.myNodeID)
@@ -235,7 +235,6 @@ func (r *ReplicationState) ResendFinalizationRequest(seq uint64, signers []NodeI
235235
// so that we can try to get a new block & finalization
236236
r.DeleteSeq(seq)
237237
r.finalizationRequestor.sendRequestToNode(seq, seq, signers[index])
238-
return nil
239238
}
240239

241240
// CreateDependencyTasks creates tasks to refetch the given parent digest and empty rounds. If there are no

0 commit comments

Comments
 (0)