Remove direct ranges call see: https://travis-ci.org/status-im/nimbus/builds/365051359#L502
This commit is contained in:
parent
b7d949eec2
commit
a5b2652f85
|
@ -10,7 +10,6 @@ skipDirs = @["tests"]
|
||||||
requires "nim >= 0.18.1",
|
requires "nim >= 0.18.1",
|
||||||
"https://github.com/cheatfate/nimcrypto#master",
|
"https://github.com/cheatfate/nimcrypto#master",
|
||||||
"https://github.com/status-im/nim-rlp",
|
"https://github.com/status-im/nim-rlp",
|
||||||
"https://github.com/status-im/nim-ranges",
|
|
||||||
"https://github.com/status-im/nim-ttmath#master"
|
"https://github.com/status-im/nim-ttmath#master"
|
||||||
|
|
||||||
proc test(name: string, lang = "cpp") =
|
proc test(name: string, lang = "cpp") =
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
import
|
import
|
||||||
strformat, tables,
|
strformat, tables,
|
||||||
../constants, ../errors, ../validation, ../account, ../logging, ../utils_numeric, .. / utils / [padding, bytes, keccak],
|
../constants, ../errors, ../validation, ../account, ../logging, ../utils_numeric, .. / utils / [padding, bytes, keccak],
|
||||||
ttmath, rlp, ranges
|
ttmath, rlp
|
||||||
|
|
||||||
type
|
type
|
||||||
AccountStateDB* = ref object
|
AccountStateDB* = ref object
|
||||||
|
@ -68,7 +68,7 @@ proc setStorage*(db: var AccountStateDB, address: string, slot: UInt256, value:
|
||||||
var storage = db.db
|
var storage = db.db
|
||||||
# TODO fix
|
# TODO fix
|
||||||
if value > 0:
|
if value > 0:
|
||||||
let encodedValue = rlp.encode(value)
|
let encodedValue = rlp.encode value.table # TODO This is a hack, RLP encoding ttmath table has issues
|
||||||
storage[slotAsKey] = encodedValue.decode(Bytes)
|
storage[slotAsKey] = encodedValue.decode(Bytes)
|
||||||
else:
|
else:
|
||||||
storage.del(slotAsKey)
|
storage.del(slotAsKey)
|
||||||
|
|
Loading…
Reference in New Issue