From 7ac47952e15f5151ea90255cbfab5cdb28992c4b Mon Sep 17 00:00:00 2001 From: Rongjian Lan Date: Thu, 5 Nov 2020 23:30:22 -0800 Subject: [PATCH] fix leader consensus timeout timing --- consensus/consensus_v2.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/consensus/consensus_v2.go b/consensus/consensus_v2.go index ad01d0691..f9a5dc910 100644 --- a/consensus/consensus_v2.go +++ b/consensus/consensus_v2.go @@ -176,6 +176,7 @@ func (consensus *Consensus) finalCommit() { Uint64("blockNum", consensus.blockNum). Msg("[finalCommit] Sent Committed Message") } + consensus.consensusTimeout[timeoutConsensus].Start() } else { // delayed send consensus.msgSender.DelayedSendWithRetry( @@ -202,7 +203,6 @@ func (consensus *Consensus) finalCommit() { } else { consensus.getLogger().Info().Msg("[finalCommit] Start consensus timer") } - consensus.consensusTimeout[timeoutConsensus].Start() consensus.getLogger().Info(). Uint64("blockNum", block.NumberU64()). @@ -568,6 +568,7 @@ func (consensus *Consensus) preCommitAndPropose(blk *types.Block) error { Uint64("blockNum", consensus.blockNum). Msg("[preCommitAndPropose] Sent Committed Message") } + consensus.consensusTimeout[timeoutConsensus].Start() // Send signal to Node to propose the new block for consensus consensus.getLogger().Info().Msg("[preCommitAndPropose] sending block proposal signal")