From 90165f4f6b53829b0c78064af24a1360f769ef0c Mon Sep 17 00:00:00 2001 From: Dustin Brody Date: Wed, 25 Jul 2018 09:31:57 -0700 Subject: [PATCH] Ethereum test fixtures provide storage values as hex literals (e.g., 0x04), not decimal literals --- VMTests.md | 10 +++++----- tests/test_helpers.nim | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/VMTests.md b/VMTests.md index 0163d08cb..1c60f5113 100644 --- a/VMTests.md +++ b/VMTests.md @@ -385,16 +385,16 @@ OK: 33/52 Fail: 4/52 Skip: 15/52 + JDfromStorageDynamicJump0_AfterJumpdest.json OK + JDfromStorageDynamicJump0_AfterJumpdest3.json OK + JDfromStorageDynamicJump0_foreverOutOfGas.json OK -- JDfromStorageDynamicJump0_jumpdest0.json Fail -- JDfromStorageDynamicJump0_jumpdest2.json Fail ++ JDfromStorageDynamicJump0_jumpdest0.json OK ++ JDfromStorageDynamicJump0_jumpdest2.json OK + JDfromStorageDynamicJump0_withoutJumpdest.json OK + JDfromStorageDynamicJump1.json OK + JDfromStorageDynamicJumpInsidePushWithJumpDest.json OK + JDfromStorageDynamicJumpInsidePushWithoutJumpDest.json OK + JDfromStorageDynamicJumpi0.json OK -- JDfromStorageDynamicJumpi1.json Fail ++ JDfromStorageDynamicJumpi1.json OK + JDfromStorageDynamicJumpi1_jumpdest.json OK -- JDfromStorageDynamicJumpiAfterStop.json Fail ++ JDfromStorageDynamicJumpiAfterStop.json OK + JDfromStorageDynamicJumpiOutsideBoundary.json OK + JDfromStorageDynamicJumpifInsidePushWithJumpDest.json OK + JDfromStorageDynamicJumpifInsidePushWithoutJumpDest.json OK @@ -483,7 +483,7 @@ OK: 33/52 Fail: 4/52 Skip: 15/52 + swapAt52becameMstore.json OK + when.json OK ``` -OK: 138/145 Fail: 6/145 Skip: 1/145 +OK: 142/145 Fail: 2/145 Skip: 1/145 ## vmLogTest ```diff + log0_emptyMem.json OK diff --git a/tests/test_helpers.nim b/tests/test_helpers.nim index fdfc18eb9..352a062e7 100644 --- a/tests/test_helpers.nim +++ b/tests/test_helpers.nim @@ -92,7 +92,7 @@ proc setupStateDB*(wantedState: JsonNode, stateDB: var AccountStateDB) = for ac, accountData in wantedState: let account = ethAddressFromHex(ac) for slot, value in accountData{"storage"}: - stateDB.setStorage(account, slot.parseHexInt.u256, value.getInt.u256) + stateDB.setStorage(account, slot.parseHexInt.u256, value.getStr.parseHexInt.u256) let nonce = accountData{"nonce"}.getInt.u256 let code = hexToSeqByte(accountData{"code"}.getStr).toRange