mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
Merge pull request #722 from gzliudan/fix-s1009
engines/engine_v2: fix staticcheck warning S1009: omit redundant nil check on slice
This commit is contained in:
commit
00fe74afd2
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) {
|
||||
return utils.ErrInvalidCheckpointVote
|
||||
}
|
||||
if header.Validators == nil || len(header.Validators) == 0 {
|
||||
if len(header.Validators) == 0 {
|
||||
return utils.ErrEmptyEpochSwitchValidators
|
||||
}
|
||||
if len(header.Validators)%common.AddressLength != 0 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue