mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-01 01:23:46 +00:00
lets try hardcoding delay
This commit is contained in:
parent
01664986e2
commit
9bb1a7f003
1 changed files with 7 additions and 5 deletions
|
|
@ -654,11 +654,13 @@ func (c *Clique) Seal(chain consensus.ChainHeaderReader, block *types.Block, res
|
|||
copy(header.Extra[len(header.Extra)-extraSeal:], sighash)
|
||||
|
||||
// Don't let delay be longer than target block period
|
||||
if delay.Milliseconds() > int64(c.config.PeriodMs) {
|
||||
log.Trace("old delay", "delay", common.PrettyDuration(delay))
|
||||
delay = time.Millisecond*time.Duration(c.config.PeriodMs) - 20*time.Millisecond
|
||||
log.Trace("new delay", "delay", common.PrettyDuration(delay))
|
||||
}
|
||||
// if delay.Milliseconds() > int64(c.config.PeriodMs) {
|
||||
// log.Trace("old delay", "delay", common.PrettyDuration(delay))
|
||||
// delay = time.Millisecond*time.Duration(c.config.PeriodMs) - 20*time.Millisecond
|
||||
// log.Trace("new delay", "delay", common.PrettyDuration(delay))
|
||||
// }
|
||||
|
||||
delay = time.Millisecond * (time.Duration(c.config.PeriodMs - 20))
|
||||
|
||||
// Wait until sealing is terminated or delay timeout.
|
||||
log.Trace("Waiting for slot to sign and propagate", "delay", common.PrettyDuration(delay))
|
||||
|
|
|
|||
Loading…
Reference in a new issue