aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-08-04 09:30:05 +0800
committerFelix Lange <fjl@twurst.com>2016-08-04 09:30:05 +0800
commit0c9a858f2d8094d48371deee97493a1b1412e7de (patch)
tree0fd079c73776543ce2e11921f955bfebffa2b6e1
parent806e3cd0751e7769bddbb2d4250b4520d912df42 (diff)
downloaddexon-0c9a858f2d8094d48371deee97493a1b1412e7de.tar
dexon-0c9a858f2d8094d48371deee97493a1b1412e7de.tar.gz
dexon-0c9a858f2d8094d48371deee97493a1b1412e7de.tar.bz2
dexon-0c9a858f2d8094d48371deee97493a1b1412e7de.tar.lz
dexon-0c9a858f2d8094d48371deee97493a1b1412e7de.tar.xz
dexon-0c9a858f2d8094d48371deee97493a1b1412e7de.tar.zst
dexon-0c9a858f2d8094d48371deee97493a1b1412e7de.zip
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.
-rw-r--r--eth/handler.go3
1 files changed, 0 insertions, 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