From 20654a1f71f0b871635e2babd6e5c024c1bf36b0 Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Thu, 12 Mar 2015 12:49:52 +0100 Subject: [PATCH] random state test optmization --- test/checkRandomStateTest.cpp | 1 + test/createRandomStateTest.cpp | 15 +++++++++++---- test/stSystemOperationsTestFiller.json | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/test/checkRandomStateTest.cpp b/test/checkRandomStateTest.cpp index 4c07c3cf9..ed12b7dc4 100644 --- a/test/checkRandomStateTest.cpp +++ b/test/checkRandomStateTest.cpp @@ -155,6 +155,7 @@ bool doStateTest(mValue& _v) { cout << "Missing expected address " << expectedAddr; return 1; + } else { if (importer.m_statePost.balance(expectedAddr) != theState.balance(expectedAddr)) diff --git a/test/createRandomStateTest.cpp b/test/createRandomStateTest.cpp index 06a332e0e..6b24f1216 100644 --- a/test/createRandomStateTest.cpp +++ b/test/createRandomStateTest.cpp @@ -87,10 +87,10 @@ int main(int argc, char *argv[]) "randomStatetest" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", + "currentDifficulty" : "0x945304eb96065b2a98b57a48a06ae28d285a71b5", + "currentGasLimit" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", "currentNumber" : "0", - "currentTimestamp" : 1, + "currentTimestamp" : "1", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, "pre" : { @@ -101,6 +101,13 @@ int main(int argc, char *argv[]) "storage" : { } }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "46", + "code" : "0x6000355415600957005b60203560003555", + "nonce" : "0", + "storage" : { + } + }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "1000000000000000000", "code" : "0x", @@ -110,7 +117,7 @@ int main(int argc, char *argv[]) } }, "transaction" : { - "data" : "", + "data" : "0x42", "gasLimit" : "400000", "gasPrice" : "1", "nonce" : "0", diff --git a/test/stSystemOperationsTestFiller.json b/test/stSystemOperationsTestFiller.json index 7460ca94e..e26308e28 100644 --- a/test/stSystemOperationsTestFiller.json +++ b/test/stSystemOperationsTestFiller.json @@ -389,7 +389,7 @@ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", "nonce" : "0", - "code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) (MSTORE 32 0xaaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa ) [[ 0 ]] (CALL 1000 0x945304eb96065b2a98b57a48a06ae28d285a71b5 23 0 64 64 0) }", + "code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) (MSTORE 32 0xaaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa ) [[ 0 ]] (CALL 100000 0x945304eb96065b2a98b57a48a06ae28d285a71b5 23 0 64 64 0) }", "storage": {} }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { @@ -410,7 +410,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",