From beb12672eaf41c8e5b42310808712589aaad6022 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Wed, 3 Oct 2018 19:24:11 -0600 Subject: [PATCH] whisper: cleanups --- eth_p2p.nim | 2 +- eth_p2p/rlpx_protocols/shh.nim | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/eth_p2p.nim b/eth_p2p.nim index 035a135..bb551da 100644 --- a/eth_p2p.nim +++ b/eth_p2p.nim @@ -154,7 +154,7 @@ type UselessPeerError* = object of Exception logScope: - topic = "rlpx" + topics = "rlpx" const baseProtocolVersion = 4 diff --git a/eth_p2p/rlpx_protocols/shh.nim b/eth_p2p/rlpx_protocols/shh.nim index bac42e1..e6c5900 100644 --- a/eth_p2p/rlpx_protocols/shh.nim +++ b/eth_p2p/rlpx_protocols/shh.nim @@ -257,9 +257,11 @@ proc encode*(self: Payload): Option[Bytes] = proc decode*(data: openarray[byte], dst = none[PrivateKey](), symKey = none[SymKey]()): Option[DecodedPayload] = - ## Decode data into payload, using keys found in self + ## Decode data into payload, potentially trying to decrypt if keys are + ## provided - # Careful throughout - data coming from unknown source + # Careful throughout - data coming from unknown source - malformatted data + # expected var res: DecodedPayload