Skip to content

Commit c320a4c

Browse files
committed
fix: ensure we're waiting long enough to avoid retriggering waits
1 parent ca3d1c3 commit c320a4c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

consensus/state.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2123,7 +2123,10 @@ func (cs *State) isReadyToPrecommit() (bool, time.Duration) {
21232123
if _, ok := cs.privValidator.(*privval.SignerClient); ok {
21242124
waitTime = waitTime - KMSSigningDelay
21252125
}
2126-
return waitTime <= 0, waitTime
2126+
// return the wait time plus some overhead to guarantee that p
2127+
// this call doesn't accidently hit this wait a second time with
2128+
// a few nanoseconds
2129+
return waitTime <= 0, waitTime + (20 * time.Millisecond)
21272130
}
21282131

21292132
//-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)