eth: don't call ValidateFields
ValidateFields was introduced before the rlp decoder disallowed nil values. Decoding RLP will never return nil values, there is no need to check for them.
This commit is contained in:
parent
806e3cd075
commit
0c9a858f2d
@ -634,9 +634,6 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
|
|||||||
if err := msg.Decode(&request); err != nil {
|
if err := msg.Decode(&request); err != nil {
|
||||||
return errResp(ErrDecode, "%v: %v", msg, err)
|
return errResp(ErrDecode, "%v: %v", msg, err)
|
||||||
}
|
}
|
||||||
if err := request.Block.ValidateFields(); err != nil {
|
|
||||||
return errResp(ErrDecode, "block validation %v: %v", msg, err)
|
|
||||||
}
|
|
||||||
request.Block.ReceivedAt = msg.ReceivedAt
|
request.Block.ReceivedAt = msg.ReceivedAt
|
||||||
request.Block.ReceivedFrom = p
|
request.Block.ReceivedFrom = p
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user