mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
commit
8ec6e2591f
1 changed files with 5 additions and 1 deletions
|
|
@ -776,10 +776,14 @@ func (c *Posv) Seal(chain consensus.ChainReader, block *types.Block, stop <-chan
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Sweet, the protocol permits us to sign the block, wait for our time
|
||||||
|
delay := time.Unix(header.Time.Int64(), 0).Sub(time.Now()) // nolint: gosimple
|
||||||
|
log.Trace("Waiting for slot to sign and propagate", "delay", common.PrettyDuration(delay))
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-stop:
|
case <-stop:
|
||||||
return nil, nil
|
return nil, nil
|
||||||
default:
|
case <-time.After(delay):
|
||||||
}
|
}
|
||||||
// Sign all the things!
|
// Sign all the things!
|
||||||
sighash, err := signFn(accounts.Account{Address: signer}, sigHash(header).Bytes())
|
sighash, err := signFn(accounts.Account{Address: signer}, sigHash(header).Bytes())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue