Skip to content

Commit eedbb1e

Browse files
committed
p2p/discover: use rlp.DecodeBytes
1 parent 2750ec4 commit eedbb1e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎p2p/discover/udp.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ func decodePacket(buf []byte) (packet, NodeID, []byte, error) {
413413
default:
414414
return nil, fromID, hash, fmt.Errorf("unknown type: %d", ptype)
415415
}
416-
err = rlp.Decode(bytes.NewReader(sigdata[1:]), req)
416+
err = rlp.DecodeBytes(sigdata[1:], req)
417417
return req, fromID, hash, err
418418
}
419419

0 commit comments

Comments
 (0)