Skip to content

Commit

Permalink
fix randomState test
Browse files Browse the repository at this point in the history
  • Loading branch information
winsvega committed Jan 30, 2018
1 parent 3c6da3d commit 59bf2e2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/tools/fuzzTesting/createRandomTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,21 @@ std::string const c_testExampleStateTest = R"(
"currentTimestamp" : "1000",
"previousHash" : "[HASH32]"
},
"expect" : [
{
"indexes" : {
"data" : -1,
"gas" : -1,
"value" : -1
},
"network" : [">=Frontier"],
"result" : {
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"nonce" : "1"
}
}
}
],
"pre" : {
"ffffffffffffffffffffffffffffffffffffffff" : {
"balance" : "[HEX]",
Expand Down
5 changes: 5 additions & 0 deletions test/tools/libtesteth/ImportTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,12 @@ set<eth::Network> ImportTest::getAllNetworksFromExpectSections(json_spirit::mArr
{
set<string> allNetworks;
for (auto const& exp : _expects)
{
requireJsonFields(exp.get_obj(), "expect",
{{"indexes", jsonVType::obj_type}, {"network", jsonVType::array_type},
{"result", jsonVType::obj_type}});
ImportTest::parseJsonStrValueIntoSet(exp.get_obj().at("network"), allNetworks);
}

allNetworks = test::translateNetworks(allNetworks);
set<eth::Network> networkSet;
Expand Down

0 comments on commit 59bf2e2

Please sign in to comment.