mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-21 14:14:30 +00:00
hotfix: signed recently issue
This commit is contained in:
parent
bdf9dd8802
commit
7e33e27642
1 changed files with 3 additions and 2 deletions
|
|
@ -718,9 +718,10 @@ func (c *Clique) Seal(chain consensus.ChainReader, block *types.Block, stop <-ch
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
masternodes := []common.Address{}
|
||||
if _, authorized := snap.Signers[signer]; !authorized {
|
||||
valid := false
|
||||
masternodes := c.GetMasternodes(chain, header)
|
||||
masternodes = c.GetMasternodes(chain, header)
|
||||
for _, m := range masternodes {
|
||||
if m == signer {
|
||||
valid = true
|
||||
|
|
@ -735,7 +736,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 doesn't shift it out
|
||||
if limit := uint64(len(snap.Signers)/2 + 1); number < limit || seen > number-limit {
|
||||
if limit := uint64(len(masternodes)/2 + 1); number < limit || seen > number-limit {
|
||||
log.Info("Signed recently, must wait for others")
|
||||
<-stop
|
||||
return nil, nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue