From eedbb1ee9a2164cd58e9fd305bc719a4c643f1a2 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 14 Apr 2015 12:02:23 +0200 Subject: [PATCH] p2p/discover: use rlp.DecodeBytes --- p2p/discover/udp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/discover/udp.go b/p2p/discover/udp.go index 61a0abed9..07a1a739c 100644 --- a/p2p/discover/udp.go +++ b/p2p/discover/udp.go @@ -413,7 +413,7 @@ func decodePacket(buf []byte) (packet, NodeID, []byte, error) { default: return nil, fromID, hash, fmt.Errorf("unknown type: %d", ptype) } - err = rlp.Decode(bytes.NewReader(sigdata[1:]), req) + err = rlp.DecodeBytes(sigdata[1:], req) return req, fromID, hash, err }