diff --git a/nimbus.nimble b/nimbus.nimble index bb18095a5..bb4743c85 100644 --- a/nimbus.nimble +++ b/nimbus.nimble @@ -10,7 +10,6 @@ skipDirs = @["tests"] requires "nim >= 0.18.1", "https://github.com/cheatfate/nimcrypto#master", "https://github.com/status-im/nim-rlp", - "https://github.com/status-im/nim-ranges", "https://github.com/status-im/nim-ttmath#master" proc test(name: string, lang = "cpp") = diff --git a/src/db/state_db.nim b/src/db/state_db.nim index 6ae344b2e..d78a10c8f 100644 --- a/src/db/state_db.nim +++ b/src/db/state_db.nim @@ -8,7 +8,7 @@ import strformat, tables, ../constants, ../errors, ../validation, ../account, ../logging, ../utils_numeric, .. / utils / [padding, bytes, keccak], - ttmath, rlp, ranges + ttmath, rlp type AccountStateDB* = ref object @@ -68,7 +68,7 @@ proc setStorage*(db: var AccountStateDB, address: string, slot: UInt256, value: var storage = db.db # TODO fix 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) else: storage.del(slotAsKey)