diff --git a/consensus/posv/posv.go b/consensus/posv/posv.go index c8055ae818..198f8df3b6 100644 --- a/consensus/posv/posv.go +++ b/consensus/posv/posv.go @@ -961,13 +961,11 @@ func (c *Posv) RecoverValidator(header *types.Header) (common.Address, error) { return address.(common.Address), nil } // Retrieve the signature from the header extra-data - if len(header.Validator) < extraSeal { + if len(header.Validator) != extraSeal { return common.Address{}, consensus.ErrMissingValidatorSignature } - signature := header.Validator[len(header.Validator)-extraSeal:] - // Recover the public key and the Ethereum address - pubkey, err := crypto.Ecrecover(sigHash(header).Bytes(), signature) + pubkey, err := crypto.Ecrecover(sigHash(header).Bytes(), header.Validator) if err != nil { return common.Address{}, err }