mirror of https://github.com/status-im/nim-eth.git
Fix build issues manifesting in our controlled build environment
This commit is contained in:
parent
54bb1adac9
commit
39857d57f0
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue