Skip to content

Commit

Permalink
sets delay to 4 s higher than timeout propose
Browse files Browse the repository at this point in the history
  • Loading branch information
staheri14 committed Aug 30, 2024
1 parent 19fa595 commit 5bdedc8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion consensus/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5bdedc8

Please sign in to comment.