From 4da71f76b9c1e9939539291fb7af2a7e914c11d2 Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Thu, 12 Apr 2018 13:34:20 +0300 Subject: [PATCH] Fixed TTInt rlp encoding. Fixes #9. (#12) --- .travis.yml | 7 ++----- nim.cfg | 11 ----------- src/db/state_db.nim | 2 +- 3 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 nim.cfg diff --git a/.travis.yml b/.travis.yml index 67d8c6417..74cd39c8a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,6 @@ matrix: - allow_failures: - # disabled for the moment: https://github.com/status-im/nimbus/issues/9 - # Installing GCC-7 on travis is not straightforward due to hombrew conflict: - # https://travis-ci.org/status-im/nimbus/jobs/365157366#L2322 - - os: osx + # allow_failures: + # - os: osx include: - os: linux diff --git a/nim.cfg b/nim.cfg deleted file mode 100644 index 678e7e818..000000000 --- a/nim.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# TODO - https://github.com/status-im/nimbus/issues/9 -# Workaround for Rlp + TT-math: -# use GCC on MacOS - -@if macosx: - cc:"gcc" - gcc.exe:"/usr/local/bin/gcc-7" - gcc.linkerexe:"/usr/local/bin/gcc-7" - gcc.cpp.exe:"/usr/local/bin/g++-7" - gcc.cpp.linkerexe:"/usr/local/bin/g++-7" -@end diff --git a/src/db/state_db.nim b/src/db/state_db.nim index d78a10c8f..a38d486e6 100644 --- a/src/db/state_db.nim +++ b/src/db/state_db.nim @@ -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.table # TODO This is a hack, RLP encoding ttmath table has issues + let encodedValue = rlp.encode value.toByteArrayBE storage[slotAsKey] = encodedValue.decode(Bytes) else: storage.del(slotAsKey)