From 40ec601d072cf62cb3d3a7929448c43896b3f936 Mon Sep 17 00:00:00 2001 From: Kim De Mey Date: Wed, 14 Dec 2022 10:57:23 +0100 Subject: [PATCH] Fix accidential usage of default rlp decode for DisconnectionReason (#572) --- eth/p2p/rlpx.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/p2p/rlpx.nim b/eth/p2p/rlpx.nim index e5cc9fe..d4616ad 100644 --- a/eth/p2p/rlpx.nim +++ b/eth/p2p/rlpx.nim @@ -708,7 +708,7 @@ proc waitSingleMsg(peer: Peer, MsgType: type): Future[MsgType] {.async.} = "Invalid RLPx message body") elif nextMsgId == 1: # p2p.disconnect - let reasonList = rlp.read(nextMsgData, DisconnectionReasonList) + let reasonList = nextMsgData.read(DisconnectionReasonList) let reason = reasonList.value await peer.disconnect(reason) trace "disconnect message received in waitSingleMsg", reason, peer