diff options
Diffstat (limited to 'core/syncer/consensus.go')
-rw-r--r-- | core/syncer/consensus.go | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/core/syncer/consensus.go b/core/syncer/consensus.go index 2eeee9d..4fc24b4 100644 --- a/core/syncer/consensus.go +++ b/core/syncer/consensus.go @@ -209,16 +209,10 @@ func (con *Consensus) assureBuffering() { }) // Register a round event handler to validate next round. con.roundEvt.Register(func(evts []utils.RoundEventParam) { - e := evts[len(evts)-1] - con.heightEvt.RegisterHeight(e.NextRoundValidationHeight(), func( - blockHeight uint64) { - select { - case <-con.ctx.Done(): - return - default: - } - con.roundEvt.ValidateNextRound(blockHeight) - }) + con.heightEvt.RegisterHeight( + evts[len(evts)-1].NextRoundValidationHeight(), + utils.RoundEventRetryHandlerGenerator(con.roundEvt, con.heightEvt), + ) }) con.roundEvt.TriggerInitEvent() con.startAgreement() |