mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 18:00:46 +00:00
engines/engine_v2: fix staticcheck warning S1009: should omit nil check
This commit is contained in:
parent
b74fccc04d
commit
363d9784bf
1 changed files with 1 additions and 1 deletions
|
|
@ -109,7 +109,7 @@ func (x *XDPoS_v2) verifyHeader(chain consensus.ChainReader, header *types.Heade
|
||||||
if !bytes.Equal(header.Nonce[:], utils.NonceDropVote) {
|
if !bytes.Equal(header.Nonce[:], utils.NonceDropVote) {
|
||||||
return utils.ErrInvalidCheckpointVote
|
return utils.ErrInvalidCheckpointVote
|
||||||
}
|
}
|
||||||
if header.Validators == nil || len(header.Validators) == 0 {
|
if len(header.Validators) == 0 {
|
||||||
return utils.ErrEmptyEpochSwitchValidators
|
return utils.ErrEmptyEpochSwitchValidators
|
||||||
}
|
}
|
||||||
if len(header.Validators)%common.AddressLength != 0 {
|
if len(header.Validators)%common.AddressLength != 0 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue