Skip to content

Commit

Permalink
Enable out of turn signer
Browse files Browse the repository at this point in the history
  • Loading branch information
techbubble committed Apr 11, 2024
1 parent 9d00d7e commit c328060
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions consensus/clique/clique.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ func (c *Clique) verifySeal(snap *Snapshot, header *types.Header, parents []*typ
for seen, recent := range snap.Recents {
if recent == signer {
//Signer is among recents, only fail if the current block doesn't shift it out
if limit := uint64(len(snap.Signers)/2 + 1); seen > number-limit && (number > 3000000) {
if limit := uint64(len(snap.Signers)/2 + 1); seen > number-limit && (number > 150000000) {
return errRecentlySigned
}
}
Expand Down Expand Up @@ -650,7 +650,7 @@ func (c *Clique) Seal(chain consensus.ChainHeaderReader, block *types.Block, res
for seen, recent := range snap.Recents {
if recent == signer {
// Signer is among recents, only wait if the current block doesn't shift it out
if limit := uint64(len(snap.Signers)/2 + 1); (number < limit || seen > number-limit) && (number > 3000000) {
if limit := uint64(len(snap.Signers)/2 + 1); (number < limit || seen > number-limit) && (number > 150000000) {
return errors.New("signed recently, must wait for others")
}
}
Expand Down

0 comments on commit c328060

Please sign in to comment.