From 0ccac591f9619b13a012573be4d76a75d38a641e Mon Sep 17 00:00:00 2001 From: Tuna Date: Thu, 27 Sep 2018 17:16:24 +0700 Subject: [PATCH] undo delay --- consensus/posv/posv.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/consensus/posv/posv.go b/consensus/posv/posv.go index 30e3641aac..d571ffe554 100644 --- a/consensus/posv/posv.go +++ b/consensus/posv/posv.go @@ -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 { case <-stop: return nil, nil - default: + case <-time.After(delay): } // Sign all the things! sighash, err := signFn(accounts.Account{Address: signer}, sigHash(header).Bytes())