mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Merge pull request #797 from maticnetwork/raneet10/revert-consensus-early-bailout
consensus/bor: revert "handle unauthorized signer in consensus.Prepare"
This commit is contained in:
commit
ef8f0abf78
1 changed files with 0 additions and 7 deletions
|
|
@ -692,13 +692,6 @@ func (c *Bor) Prepare(chain consensus.ChainHeaderReader, header *types.Header) e
|
||||||
|
|
||||||
currentSigner := *c.authorizedSigner.Load()
|
currentSigner := *c.authorizedSigner.Load()
|
||||||
|
|
||||||
// Bail out early if we're unauthorized to sign a block. This check also takes
|
|
||||||
// place before block is signed in `Seal`.
|
|
||||||
if !snap.ValidatorSet.HasAddress(currentSigner.signer) {
|
|
||||||
// Check the UnauthorizedSignerError.Error() msg to see why we pass number-1
|
|
||||||
return &UnauthorizedSignerError{number - 1, currentSigner.signer.Bytes()}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the correct difficulty
|
// Set the correct difficulty
|
||||||
header.Difficulty = new(big.Int).SetUint64(Difficulty(snap.ValidatorSet, currentSigner.signer))
|
header.Difficulty = new(big.Int).SetUint64(Difficulty(snap.ValidatorSet, currentSigner.signer))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue