From 5bdedc84a83d9e13bd65d03841cff158d0e6d860 Mon Sep 17 00:00:00 2001 From: sanaz Date: Fri, 30 Aug 2024 10:11:37 -0700 Subject: [PATCH] sets delay to 4 s higher than timeout propose --- consensus/state.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/consensus/state.go b/consensus/state.go index 70952b23b3..805caf11b6 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -1382,7 +1382,8 @@ func (cs *State) enterPrevoteWait(height int64, round int32) { func (cs *State) isReadyToPrecommit(height int64, round int32) (bool, time.Duration) { // 10 s for block propagation + 2s for block processing + 2 s for prevotes // collection = 14 s - precommitVoteTime := cs.StartTime.Add(14 * time.Second) + precommitVoteTime := cs.StartTime.Add((cs.config. + TimeoutPropose + 2 + 2) * time.Second) waitTime := time.Until(precommitVoteTime) schema.WritePrecommitTime(cs.traceClient, height, round, waitTime.Seconds()) return waitTime <= 0, waitTime