Skip to content

Commit aabfccf

Browse files
authored
fix: empty block period waiting too long (#1549)
1 parent 2602589 commit aabfccf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

consensus/istanbul/qbft/core/request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func (c *core) handleRequest(request *Request) error {
6161
config := c.config.GetConfig(c.current.Sequence())
6262
if config.EmptyBlockPeriod > config.BlockPeriod {
6363
log.Info("EmptyBlockPeriod detected adding delay to request", "EmptyBlockPeriod", config.EmptyBlockPeriod, "BlockTime", block.Time())
64-
delay = time.Duration(config.EmptyBlockPeriod) * time.Second
64+
delay = time.Duration(config.EmptyBlockPeriod-config.BlockPeriod) * time.Second
6565
}
6666
}
6767

0 commit comments

Comments
 (0)