mirror of
https://github.com/status-im/nim-eth-p2p.git
synced 2025-01-25 22:29:01 +00:00
whisper: cleanups
This commit is contained in:
parent
a394b62020
commit
beb12672ea
@ -154,7 +154,7 @@ type
|
||||
UselessPeerError* = object of Exception
|
||||
|
||||
logScope:
|
||||
topic = "rlpx"
|
||||
topics = "rlpx"
|
||||
|
||||
const
|
||||
baseProtocolVersion = 4
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user