whisper: cleanups

This commit is contained in:
Jacek Sieka 2018-10-03 19:24:11 -06:00
parent a394b62020
commit beb12672ea
No known key found for this signature in database
GPG Key ID: 6299FEB3EB6FA465
2 changed files with 5 additions and 3 deletions

View File

@ -154,7 +154,7 @@ type
UselessPeerError* = object of Exception
logScope:
topic = "rlpx"
topics = "rlpx"
const
baseProtocolVersion = 4

View File

@ -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