From 0c9a858f2d8094d48371deee97493a1b1412e7de Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 4 Aug 2016 03:30:05 +0200 Subject: [PATCH] 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. --- eth/handler.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/eth/handler.go b/eth/handler.go index 886d89fd1..570c79dac 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -634,9 +634,6 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { if err := msg.Decode(&request); err != nil { 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.ReceivedFrom = p