mirror of https://github.com/status-im/nim-eth.git
fixes related to stint breaking changes
This commit is contained in:
parent
c3860244b1
commit
6dacb2ca5c
|
@ -34,6 +34,15 @@ proc read*(rlp: var Rlp, T: type StUint): T {.inline.} =
|
|||
|
||||
rlp.skipElem
|
||||
|
||||
func significantBytesBE(val: openArray[byte]): int =
|
||||
## Returns the number of significant trailing bytes in a big endian
|
||||
## representation of a number.
|
||||
# TODO: move that in https://github.com/status-im/nim-byteutils
|
||||
for i in 0 ..< val.len:
|
||||
if val[i] != 0:
|
||||
return val.len - i
|
||||
return 1
|
||||
|
||||
proc append*(rlpWriter: var RlpWriter, value: StUint) =
|
||||
if value > 128:
|
||||
let bytes = value.toByteArrayBE
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
import
|
||||
std/[tables, options, hashes, net],
|
||||
nimcrypto/[bcmode, rijndael, sha2], stint, chronicles,
|
||||
stew/[results, byteutils], metrics,
|
||||
stew/[results, byteutils, endians2], metrics,
|
||||
".."/../[rlp, keys],
|
||||
"."/[messages_encoding, node, enr, hkdf, sessions]
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import
|
|||
std/[algorithm, times, sequtils, bitops, sets, options],
|
||||
bearssl/rand,
|
||||
stint, chronicles, metrics, chronos, stew/shims/net as stewNet,
|
||||
../../net/utils,
|
||||
../../net/utils, stew/endians2,
|
||||
"."/[node, random2, enr]
|
||||
|
||||
export options
|
||||
|
|
Loading…
Reference in New Issue