Merge pull request #83 from status-im/FixTestFixtureValueHexLiteralParsing

Ethereum test fixtures provide storage values as hex literals
This commit is contained in:
Yuriy Glukhov 2018-07-26 23:10:31 +03:00 committed by GitHub
commit fc09bd2874
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -385,16 +385,16 @@ OK: 33/52 Fail: 4/52 Skip: 15/52
+ JDfromStorageDynamicJump0_AfterJumpdest.json OK + JDfromStorageDynamicJump0_AfterJumpdest.json OK
+ JDfromStorageDynamicJump0_AfterJumpdest3.json OK + JDfromStorageDynamicJump0_AfterJumpdest3.json OK
+ JDfromStorageDynamicJump0_foreverOutOfGas.json OK + JDfromStorageDynamicJump0_foreverOutOfGas.json OK
- JDfromStorageDynamicJump0_jumpdest0.json Fail + JDfromStorageDynamicJump0_jumpdest0.json OK
- JDfromStorageDynamicJump0_jumpdest2.json Fail + JDfromStorageDynamicJump0_jumpdest2.json OK
+ JDfromStorageDynamicJump0_withoutJumpdest.json OK + JDfromStorageDynamicJump0_withoutJumpdest.json OK
+ JDfromStorageDynamicJump1.json OK + JDfromStorageDynamicJump1.json OK
+ JDfromStorageDynamicJumpInsidePushWithJumpDest.json OK + JDfromStorageDynamicJumpInsidePushWithJumpDest.json OK
+ JDfromStorageDynamicJumpInsidePushWithoutJumpDest.json OK + JDfromStorageDynamicJumpInsidePushWithoutJumpDest.json OK
+ JDfromStorageDynamicJumpi0.json OK + JDfromStorageDynamicJumpi0.json OK
- JDfromStorageDynamicJumpi1.json Fail + JDfromStorageDynamicJumpi1.json OK
+ JDfromStorageDynamicJumpi1_jumpdest.json OK + JDfromStorageDynamicJumpi1_jumpdest.json OK
- JDfromStorageDynamicJumpiAfterStop.json Fail + JDfromStorageDynamicJumpiAfterStop.json OK
+ JDfromStorageDynamicJumpiOutsideBoundary.json OK + JDfromStorageDynamicJumpiOutsideBoundary.json OK
+ JDfromStorageDynamicJumpifInsidePushWithJumpDest.json OK + JDfromStorageDynamicJumpifInsidePushWithJumpDest.json OK
+ JDfromStorageDynamicJumpifInsidePushWithoutJumpDest.json OK + JDfromStorageDynamicJumpifInsidePushWithoutJumpDest.json OK
@ -483,7 +483,7 @@ OK: 33/52 Fail: 4/52 Skip: 15/52
+ swapAt52becameMstore.json OK + swapAt52becameMstore.json OK
+ when.json OK + when.json OK
``` ```
OK: 138/145 Fail: 6/145 Skip: 1/145 OK: 142/145 Fail: 2/145 Skip: 1/145
## vmLogTest ## vmLogTest
```diff ```diff
+ log0_emptyMem.json OK + log0_emptyMem.json OK

View File

@ -92,7 +92,7 @@ proc setupStateDB*(wantedState: JsonNode, stateDB: var AccountStateDB) =
for ac, accountData in wantedState: for ac, accountData in wantedState:
let account = ethAddressFromHex(ac) let account = ethAddressFromHex(ac)
for slot, value in accountData{"storage"}: 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 nonce = accountData{"nonce"}.getInt.u256
let code = hexToSeqByte(accountData{"code"}.getStr).toRange let code = hexToSeqByte(accountData{"code"}.getStr).toRange