Merge pull request #23 from status-im/hide-append

Hide discovery append helpers for now, to not interfere with rlpx
This commit is contained in:
Yuriy Glukhov 2018-05-18 12:55:23 +03:00 committed by GitHub
commit 42ad1e7fdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,15 +65,9 @@ proc append*(w: var RlpWriter, a: IpAddress) =
of IpAddressFamily.IPv4:
w.append(a.address_v4.toMemRange)
proc append*(w: var RlpWriter, p: Port) {.inline.} = w.append(p.int)
proc append*(w: var RlpWriter, pk: PublicKey) {.inline.} =
var bytes: array[64, byte]
pk.toRaw(bytes)
w.append(toMemRange(bytes))
proc append*(w: var RlpWriter, h: MDigest[256]) {.inline.} =
w.append(toMemRange(h.data))
proc append(w: var RlpWriter, p: Port) {.inline.} = w.append(p.int)
proc append(w: var RlpWriter, pk: PublicKey) {.inline.} = w.append(pk.getRaw())
proc append(w: var RlpWriter, h: MDigest[256]) {.inline.} = w.append(h.data)
proc pack(cmdId: CommandId, payload: BytesRange, pk: PrivateKey): Bytes =
## Create and sign a UDP message to be sent to a remote node.