consensus/bor: revert handle unauthorized signer in consensus.Prepare

This commit is contained in:
Raneet Debnath 2023-03-29 17:36:57 +05:30
parent aaf5fe32f6
commit bec3c39b73
No known key found for this signature in database
GPG key ID: F5C0ADBB4933AD2C

View file

@ -694,10 +694,10 @@ func (c *Bor) Prepare(chain consensus.ChainHeaderReader, header *types.Header) e
// 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()}
}
// 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
header.Difficulty = new(big.Int).SetUint64(Difficulty(snap.ValidatorSet, currentSigner.signer))