From ba3d2b43ae095df7fcbdfab0e22d8587963a9450 Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Fri, 12 Dec 2014 22:16:51 +0100 Subject: Added recursive create test + lesser output for safe VM exceptions --- recursiveCreateFiller.json | 35 ----------------------------------- stRecursiveCreateFiller.json | 35 +++++++++++++++++++++++++++++++++++ state.cpp | 5 +++++ vm.cpp | 2 +- 4 files changed, 41 insertions(+), 36 deletions(-) delete mode 100644 recursiveCreateFiller.json create mode 100644 stRecursiveCreateFiller.json diff --git a/recursiveCreateFiller.json b/recursiveCreateFiller.json deleted file mode 100644 index 0d18fb7a..00000000 --- a/recursiveCreateFiller.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "recursiveCreate": { - "env": { - "previousHash": "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", - "currentNumber": "0", - "currentGasLimit": "10000000", - "currentDifficulty": "256", - "currentTimestamp": 1, - "currentCoinbase": "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" - }, - "pre": { - "095e7baea6a6c7c4c2dfeb977efac326af552d87": { - "balance": "20000000", - "nonce": 0, - "code": "{(CODECOPY 0 0 32)(CREATE 0 0 32)}", - "storage": {} - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "balance": "1000000000000000000", - "nonce": 0, - "code": "", - "storage": {} - } - }, - "transaction": { - "nonce": "0", - "gasPrice": "1", - "gasLimit": "465224", - "to": "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value": "100000", - "secretKey": "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", - "data": "" - } - } -} diff --git a/stRecursiveCreateFiller.json b/stRecursiveCreateFiller.json new file mode 100644 index 00000000..0d18fb7a --- /dev/null +++ b/stRecursiveCreateFiller.json @@ -0,0 +1,35 @@ +{ + "recursiveCreate": { + "env": { + "previousHash": "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber": "0", + "currentGasLimit": "10000000", + "currentDifficulty": "256", + "currentTimestamp": 1, + "currentCoinbase": "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "pre": { + "095e7baea6a6c7c4c2dfeb977efac326af552d87": { + "balance": "20000000", + "nonce": 0, + "code": "{(CODECOPY 0 0 32)(CREATE 0 0 32)}", + "storage": {} + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "balance": "1000000000000000000", + "nonce": 0, + "code": "", + "storage": {} + } + }, + "transaction": { + "nonce": "0", + "gasPrice": "1", + "gasLimit": "465224", + "to": "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value": "100000", + "secretKey": "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "data": "" + } + } +} diff --git a/state.cpp b/state.cpp index 3fe0fe30..e1d5def6 100644 --- a/state.cpp +++ b/state.cpp @@ -130,6 +130,11 @@ BOOST_AUTO_TEST_CASE(stLogTests) dev::test::executeTests("stLogTests", "/StateTests", dev::test::doStateTests); } +BOOST_AUTO_TEST_CASE(stRecursiveCreate) +{ + dev::test::executeTests("stRecursiveCreate", "/StateTests", dev::test::doStateTests); +} + BOOST_AUTO_TEST_CASE(stSpecialTest) { dev::test::executeTests("stSpecialTest", "/StateTests", dev::test::doStateTests); diff --git a/vm.cpp b/vm.cpp index f05981d9..49d6ed10 100644 --- a/vm.cpp +++ b/vm.cpp @@ -311,7 +311,7 @@ void doVMTests(json_spirit::mValue& v, bool _fillin) } catch (VMException const& _e) { - cnote << "VM did throw an exception: " << diagnostic_information(_e); + cnote << "Safe VM Exception"; vmExceptionOccured = true; } catch (Exception const& _e) -- cgit v1.2.3