mirror of
https://github.com/status-im/nim-eth-p2p.git
synced 2025-01-27 15:14:45 +00:00
whisper: cleanups
This commit is contained in:
parent
a394b62020
commit
beb12672ea
@ -154,7 +154,7 @@ type
|
|||||||
UselessPeerError* = object of Exception
|
UselessPeerError* = object of Exception
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topic = "rlpx"
|
topics = "rlpx"
|
||||||
|
|
||||||
const
|
const
|
||||||
baseProtocolVersion = 4
|
baseProtocolVersion = 4
|
||||||
|
@ -257,9 +257,11 @@ proc encode*(self: Payload): Option[Bytes] =
|
|||||||
|
|
||||||
proc decode*(data: openarray[byte], dst = none[PrivateKey](),
|
proc decode*(data: openarray[byte], dst = none[PrivateKey](),
|
||||||
symKey = none[SymKey]()): Option[DecodedPayload] =
|
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
|
var res: DecodedPayload
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user