aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--stQuadraticComplexityTestFiller.json49
-rw-r--r--stSystemOperationsTestFiller.json48
-rw-r--r--state.cpp5
-rw-r--r--stquadraticcomplexitytestfiller.json1
4 files changed, 102 insertions, 1 deletions
diff --git a/stQuadraticComplexityTestFiller.json b/stQuadraticComplexityTestFiller.json
new file mode 100644
index 00000000..f474cb21
--- /dev/null
+++ b/stQuadraticComplexityTestFiller.json
@@ -0,0 +1,49 @@
+{
+ "Call50000" : {
+ "env" : {
+ "currentCoinbase" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
+ "currentDifficulty" : "45678256",
+ "currentGasLimit" : "0xffffffffffffffffffffffffffffffff",
+ "currentNumber" : "0",
+ "currentTimestamp" : 1,
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0xffffffffffffffffffffffffffffffff",
+ "code" : "",
+ "nonce" : "0",
+ "storage" : {
+ }
+ },
+
+ "aaaf5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "7000",
+ "code" : "",
+ "nonce" : "0",
+ "storage" : {
+ }
+ },
+
+ "bbbf5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000",
+ "code" : "{ (for {} (< @i 100) [i](+ @i 1) [[ 0 ]](CALL 0xfffffffffff 0xaaaf5374fce5edbc8e2a8697c15331677e6ebf0b 1 0 50000 0 0) ) [[ 1 ]] @i}",
+ "nonce" : "0",
+ "storage" : {
+ }
+ }
+ },
+
+ "transaction" :
+ {
+ "data" : "",
+ "gasLimit" : "0xffffffffffffffffffffffffffffff",
+ "gasPrice" : "1",
+ "nonce" : "",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "bbbf5374fce5edbc8e2a8697c15331677e6ebf0b",
+ "value" : "10"
+ }
+ }
+}
diff --git a/stSystemOperationsTestFiller.json b/stSystemOperationsTestFiller.json
index 9fbfbe25..3b08ca67 100644
--- a/stSystemOperationsTestFiller.json
+++ b/stSystemOperationsTestFiller.json
@@ -2268,5 +2268,53 @@
"secretKey": "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"data": ""
}
+ },
+
+ "Call10" : {
+ "env" : {
+ "currentCoinbase" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
+ "currentDifficulty" : "45678256",
+ "currentGasLimit" : "0xffffffffffffffffffffffffffffffff",
+ "currentNumber" : "0",
+ "currentTimestamp" : 1,
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0xffffffffffffffffffffffffffffffff",
+ "code" : "",
+ "nonce" : "0",
+ "storage" : {
+ }
+ },
+
+ "aaaf5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "7000",
+ "code" : "",
+ "nonce" : "0",
+ "storage" : {
+ }
+ },
+
+ "bbbf5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000",
+ "code" : "{ (for {} (< @i 10) [i](+ @i 1) [[ 0 ]](CALL 0xfffffffffff 0xaaaf5374fce5edbc8e2a8697c15331677e6ebf0b 1 0 50000 0 0) ) [[ 1 ]] @i}",
+ "nonce" : "0",
+ "storage" : {
+ }
+ }
+ },
+
+ "transaction" :
+ {
+ "data" : "",
+ "gasLimit" : "0xffffffffffffffffffffffffffffff",
+ "gasPrice" : "1",
+ "nonce" : "",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "bbbf5374fce5edbc8e2a8697c15331677e6ebf0b",
+ "value" : "10"
+ }
}
}
diff --git a/state.cpp b/state.cpp
index 03f01d0f..4e955df4 100644
--- a/state.cpp
+++ b/state.cpp
@@ -159,6 +159,11 @@ BOOST_AUTO_TEST_CASE(stBlockHashTest)
dev::test::executeTests("stBlockHashTest", "/StateTests", dev::test::doStateTests);
}
+BOOST_AUTO_TEST_CASE(stQuadraticComplexityTest)
+{
+ dev::test::executeTests("stQuadraticComplexityTest", "/StateTests", dev::test::doStateTests);
+}
+
BOOST_AUTO_TEST_CASE(stSolidityTest)
{
dev::test::executeTests("stSolidityTest", "/StateTests", dev::test::doStateTests);
diff --git a/stquadraticcomplexitytestfiller.json b/stquadraticcomplexitytestfiller.json
deleted file mode 100644
index 8b137891..00000000
--- a/stquadraticcomplexitytestfiller.json
+++ /dev/null
@@ -1 +0,0 @@
-