mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
engine_v2: reject wrong signature earlier, close XFN-29 (#1661)
This commit is contained in:
parent
0f4d266b9b
commit
aecb6ff7dc
1 changed files with 2 additions and 0 deletions
|
|
@ -41,6 +41,8 @@ func (x *XDPoS_v2) verifyHeader(chain consensus.ChainReader, header *types.Heade
|
|||
if len(header.Validator) == 0 {
|
||||
// This should never happen, if it does, then it means the peer is sending us invalid data.
|
||||
return consensus.ErrNoValidatorSignatureV2
|
||||
} else if len(header.Validator) != 65 {
|
||||
return fmt.Errorf("invalid validator signature length %d, want 65", len(header.Validator))
|
||||
}
|
||||
|
||||
if fullVerify {
|
||||
|
|
|
|||
Loading…
Reference in a new issue