Merge pull request #196 from ngtuna/delay

undo delay
This commit is contained in:
Tuna 2018-09-27 17:17:11 +07:00 committed by GitHub
commit 8ec6e2591f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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())