diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-05-03 16:45:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-03 16:45:36 +0800 |
commit | 02fa3e3179011bcbdf9142f9efba8d3a52df8987 (patch) | |
tree | 0218896d818abc4622e7fd570381b95506bcb0c3 | |
parent | a8eafcdc0e01ba1adcb25bfb0e06e7575c1a436e (diff) | |
parent | bcf2465b0b9c2aefcc7b79bdc24025f1497c08b1 (diff) | |
download | dexon-02fa3e3179011bcbdf9142f9efba8d3a52df8987.tar.gz dexon-02fa3e3179011bcbdf9142f9efba8d3a52df8987.tar.zst dexon-02fa3e3179011bcbdf9142f9efba8d3a52df8987.zip |
Merge pull request #14411 from karalabe/clique-double-sign
consensus/clique: fix overflow on recent signer check around genesis
-rw-r--r-- | consensus/clique/clique.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go index 8619bd1d8..675333bcc 100644 --- a/consensus/clique/clique.go +++ b/consensus/clique/clique.go @@ -599,7 +599,7 @@ func (c *Clique) Seal(chain consensus.ChainReader, block *types.Block, stop <-ch for seen, recent := range snap.Recents { if recent == signer { // Signer is among recents, only wait if the current block doens't shift it out - if limit := uint64(len(snap.Signers)/2 + 1); seen > number-limit { + if limit := uint64(len(snap.Signers)/2 + 1); number < limit || seen > number-limit { log.Info("Signed recently, must wait for others") <-stop return nil, nil |