We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 57b107b + 7f468e4 commit 1d28a1cCopy full SHA for 1d28a1c
consensus/istanbul/core/core.go
@@ -318,8 +318,12 @@ func (c *core) newRoundChangeTimer() {
318
c.stopTimer()
319
320
// set timeout based on the round number
321
- t := c.config.RequestTimeout + uint64(math.Pow(2, float64(c.current.Round().Uint64())))
322
- timeout := time.Duration(t) * time.Millisecond
+ timeout := time.Duration(c.config.RequestTimeout) * time.Millisecond
+ round := c.current.Round().Uint64()
323
+ if round > 0 {
324
+ timeout += time.Duration(math.Pow(2, float64(round))) * time.Second
325
+ }
326
+
327
c.roundChangeTimer = time.AfterFunc(timeout, func() {
328
c.sendEvent(timeoutEvent{})
329
})
0 commit comments