From 62c1e668a95d2c0aae9a79bd91e1d17dd090c230 Mon Sep 17 00:00:00 2001 From: andri lim Date: Sat, 23 Mar 2019 20:37:28 +0700 Subject: [PATCH] fix tx_e1c174e2 problem, GST +1 --- GeneralStateTests.md | 6 +++--- nimbus/vm_state_transactions.nim | 2 +- tests/test_generalstate_failing.nim | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/GeneralStateTests.md b/GeneralStateTests.md index 85d766951..f35754bd4 100644 --- a/GeneralStateTests.md +++ b/GeneralStateTests.md @@ -1711,9 +1711,9 @@ OK: 16/16 Fail: 0/16 Skip: 0/16 + makeMoney.json OK sha3_deja.json Skip txCost-sec73.json Skip - tx_e1c174e2.json Skip ++ tx_e1c174e2.json OK ``` -OK: 4/13 Fail: 0/13 Skip: 9/13 +OK: 5/13 Fail: 0/13 Skip: 8/13 ## stStackTests ```diff shallowStack.json Skip @@ -2520,4 +2520,4 @@ OK: 0/133 Fail: 0/133 Skip: 133/133 OK: 0/130 Fail: 0/130 Skip: 130/130 ---TOTAL--- -OK: 1432/2334 Fail: 0/2334 Skip: 902/2334 +OK: 1433/2334 Fail: 0/2334 Skip: 901/2334 diff --git a/nimbus/vm_state_transactions.nim b/nimbus/vm_state_transactions.nim index 07f91cc0e..65af19b14 100644 --- a/nimbus/vm_state_transactions.nim +++ b/nimbus/vm_state_transactions.nim @@ -19,7 +19,7 @@ proc validateTransaction*(vmState: BaseVMState, transaction: Transaction, sender let gasCost = transaction.gasLimit.u256 * transaction.gasPrice.u256 transaction.gasLimit >= transaction.intrinsicGas and - transaction.gasPrice <= (1 shl 34) and + #transaction.gasPrice <= (1 shl 34) and limitAndValue <= readOnlyDB.getBalance(sender) and transaction.accountNonce == readOnlyDB.getNonce(sender) and readOnlyDB.getBalance(sender) >= gasCost diff --git a/tests/test_generalstate_failing.nim b/tests/test_generalstate_failing.nim index 565200724..0b9bc3dc6 100644 --- a/tests/test_generalstate_failing.nim +++ b/tests/test_generalstate_failing.nim @@ -15,7 +15,6 @@ func allowedFailingGeneralStateTest*(folder, name: string): bool = let allowedFailingGeneralStateTests = @[ "randomStatetest14.json", "randomStatetest85.json", - "tx_e1c174e2.json", # 2019-02-17: "pairingTest.json", "pointAdd.json",