aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-04-14 18:02:23 +0800
committerFelix Lange <fjl@twurst.com>2015-04-17 20:45:09 +0800
commiteedbb1ee9a2164cd58e9fd305bc719a4c643f1a2 (patch)
treef8ad828c417153738a11f1964b3df9e9dc4c6377
parent2750ec47b7e7ff864eaed72255581e11080907d7 (diff)
downloaddexon-eedbb1ee9a2164cd58e9fd305bc719a4c643f1a2.tar
dexon-eedbb1ee9a2164cd58e9fd305bc719a4c643f1a2.tar.gz
dexon-eedbb1ee9a2164cd58e9fd305bc719a4c643f1a2.tar.bz2
dexon-eedbb1ee9a2164cd58e9fd305bc719a4c643f1a2.tar.lz
dexon-eedbb1ee9a2164cd58e9fd305bc719a4c643f1a2.tar.xz
dexon-eedbb1ee9a2164cd58e9fd305bc719a4c643f1a2.tar.zst
dexon-eedbb1ee9a2164cd58e9fd305bc719a4c643f1a2.zip
p2p/discover: use rlp.DecodeBytes
-rw-r--r--p2p/discover/udp.go2
1 files changed, 1 insertions, 1 deletions
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
}