Fix build issues manifesting in our controlled build environment

This commit is contained in:
Zahary Karadjov 2019-12-18 01:16:28 +02:00 committed by zah
parent 54bb1adac9
commit 39857d57f0
3 changed files with 12 additions and 4 deletions

View File

@ -1,5 +1,8 @@
import tables, sets, endians, options, math
import types, encoding, node, routing_table, eth/[rlp, keys], chronicles, chronos, ../enode, stint, enr, byteutils
import
tables, sets, endians, options, math,
stew/byteutils, eth/[rlp, keys], chronicles, chronos, stint,
../enode, types, encoding, node, routing_table, enr
import nimcrypto except toHex
type

View File

@ -14,6 +14,11 @@ type
Database* = ref object of RootRef
PacketKind* = enum
# TODO This is needed only to make Nim 1.0.4 happy
# Without it, the `PacketKind` type cannot be used as
# a discriminator in case objects.
unused = 0x00
ping = 0x01
pong = 0x02
findnode = 0x03

View File

@ -61,7 +61,7 @@ proc rlpFromHex*(input: string): Rlp =
proc hasData*(self: Rlp): bool =
position < bytes.len
proc currentElemEnd(self: Rlp): int {.gcsafe.}
proc currentElemEnd*(self: Rlp): int {.gcsafe.}
proc rawData*(self: Rlp): BytesRange =
return self.bytes[position ..< self.currentElemEnd]
@ -233,7 +233,7 @@ proc toBytes*(self: Rlp): BytesRange =
result = bytes.slice(ibegin, iend)
proc currentElemEnd(self: Rlp): int =
proc currentElemEnd*(self: Rlp): int =
doAssert hasData()
result = position