Skip to content

Commit bcf2465

Browse files
committed
consensus/clique: fix overflow on recent signer check around genesis
1 parent c3dc01c commit bcf2465

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

consensus/clique/clique.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ func (c *Clique) Seal(chain consensus.ChainReader, block *types.Block, stop <-ch
599599
for seen, recent := range snap.Recents {
600600
if recent == signer {
601601
// Signer is among recents, only wait if the current block doens't shift it out
602-
if limit := uint64(len(snap.Signers)/2 + 1); seen > number-limit {
602+
if limit := uint64(len(snap.Signers)/2 + 1); number < limit || seen > number-limit {
603603
log.Info("Signed recently, must wait for others")
604604
<-stop
605605
return nil, nil

0 commit comments

Comments
 (0)