Browse Source

AllFieldsHex: State Tests

cl-refactor
winsvega 10 years ago
parent
commit
7d79d257d9
  1. 28
      test/TestHelper.cpp
  2. 1
      test/TestHelper.h
  3. 78
      test/stTransactionTestFiller.json
  4. 1
      test/transaction.cpp

28
test/TestHelper.cpp

@ -102,7 +102,6 @@ struct ValueTooLarge: virtual Exception {};
struct MissingFields : virtual Exception {}; struct MissingFields : virtual Exception {};
bigint const c_max256plus1 = bigint(1) << 256; bigint const c_max256plus1 = bigint(1) << 256;
ImportTest::ImportTest(json_spirit::mObject& _o, bool isFiller): ImportTest::ImportTest(json_spirit::mObject& _o, bool isFiller):
m_statePre(OverlayDB(), eth::BaseState::Empty, Address(_o["env"].get_obj()["currentCoinbase"].get_str())), m_statePre(OverlayDB(), eth::BaseState::Empty, Address(_o["env"].get_obj()["currentCoinbase"].get_str())),
m_statePost(OverlayDB(), eth::BaseState::Empty, Address(_o["env"].get_obj()["currentCoinbase"].get_str())), m_statePost(OverlayDB(), eth::BaseState::Empty, Address(_o["env"].get_obj()["currentCoinbase"].get_str())),
@ -119,6 +118,27 @@ ImportTest::ImportTest(json_spirit::mObject& _o, bool isFiller):
} }
} }
json_spirit::mObject& ImportTest::makeAllFieldsHex(json_spirit::mObject& _o)
{
for (json_spirit::mObject::iterator it = _o.begin(); it != _o.end(); it++)
{
string key = (*it).first;
if (key == "to")
continue;
string str = (*it).second.get_str();
_o[key] = (str.substr(0, 2) == "0x" ||
str.find("a") != string::npos ||
str.find("b") != string::npos ||
str.find("c") != string::npos ||
str.find("d") != string::npos ||
str.find("e") != string::npos ||
str.find("f") != string::npos
) ? str : "0x" + toHex(toCompactBigEndian(toInt(str)));
}
return _o;
}
void ImportTest::importEnv(json_spirit::mObject& _o) void ImportTest::importEnv(json_spirit::mObject& _o)
{ {
assert(_o.count("previousHash") > 0); assert(_o.count("previousHash") > 0);
@ -325,6 +345,8 @@ void ImportTest::exportTest(bytes const& _output, State const& _statePost)
// export pre state // export pre state
m_TestObject["pre"] = fillJsonWithState(m_statePre); m_TestObject["pre"] = fillJsonWithState(m_statePre);
m_TestObject["env"] = makeAllFieldsHex(m_TestObject["env"].get_obj());
m_TestObject["transaction"] = makeAllFieldsHex(m_TestObject["transaction"].get_obj());
} }
json_spirit::mObject fillJsonWithState(State _state) json_spirit::mObject fillJsonWithState(State _state)
@ -335,8 +357,8 @@ json_spirit::mObject fillJsonWithState(State _state)
for (auto const& a: _state.addresses()) for (auto const& a: _state.addresses())
{ {
json_spirit::mObject o; json_spirit::mObject o;
o["balance"] = toString(_state.balance(a.first)); o["balance"] = "0x" + toHex(toCompactBigEndian(_state.balance(a.first)));
o["nonce"] = toString(_state.transactionsFrom(a.first)); o["nonce"] = "0x" + toHex(toCompactBigEndian(_state.transactionsFrom(a.first)));
{ {
json_spirit::mObject store; json_spirit::mObject store;
for (auto const& s: _state.storage(a.first)) for (auto const& s: _state.storage(a.first))

1
test/TestHelper.h

@ -121,6 +121,7 @@ public:
static void importState(json_spirit::mObject& _o, eth::State& _state); static void importState(json_spirit::mObject& _o, eth::State& _state);
static void importState(json_spirit::mObject& _o, eth::State& _state, stateOptionsMap& _stateOptionsMap); static void importState(json_spirit::mObject& _o, eth::State& _state, stateOptionsMap& _stateOptionsMap);
void importTransaction(json_spirit::mObject& _o); void importTransaction(json_spirit::mObject& _o);
static json_spirit::mObject& makeAllFieldsHex(json_spirit::mObject& _o);
void exportTest(bytes const& _output, eth::State const& _statePost); void exportTest(bytes const& _output, eth::State const& _statePost);
static void checkExpectedState(eth::State const& _stateExpect, eth::State const& _statePost, stateOptionsMap const _expectedStateOptions = stateOptionsMap(), WhenError _throw = WhenError::Throw); static void checkExpectedState(eth::State const& _stateExpect, eth::State const& _statePost, stateOptionsMap const _expectedStateOptions = stateOptionsMap(), WhenError _throw = WhenError::Throw);

78
test/stTransactionTestFiller.json

@ -5,7 +5,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000", "currentGasLimit" : "1000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -42,7 +42,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000", "currentGasLimit" : "1000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -85,7 +85,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000", "currentGasLimit" : "1000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -128,7 +128,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000", "currentGasLimit" : "1000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -167,7 +167,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000", "currentGasLimit" : "1000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -207,7 +207,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000", "currentGasLimit" : "1000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -280,7 +280,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1100", "currentGasLimit" : "1100",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -316,7 +316,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "22000", "currentGasLimit" : "22000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -370,7 +370,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "47766", "currentGasLimit" : "47766",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -424,7 +424,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "220000", "currentGasLimit" : "220000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -479,7 +479,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "21100", "currentGasLimit" : "21100",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -515,7 +515,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "21100", "currentGasLimit" : "21100",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -552,7 +552,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "10000000", "currentGasLimit" : "10000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -609,7 +609,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "100000", "currentGasLimit" : "100000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -678,7 +678,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000", "currentGasLimit" : "1000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -761,7 +761,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000", "currentGasLimit" : "1000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -834,7 +834,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "10000000", "currentGasLimit" : "10000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -925,7 +925,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "10000000", "currentGasLimit" : "10000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1003,7 +1003,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000", "currentGasLimit" : "1000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1056,7 +1056,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000", "currentGasLimit" : "1000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1110,7 +1110,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000", "currentGasLimit" : "1000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1170,7 +1170,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "10000000", "currentGasLimit" : "10000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1226,7 +1226,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "100000", "currentGasLimit" : "100000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1284,7 +1284,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000", "currentGasLimit" : "1000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1333,7 +1333,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000", "currentGasLimit" : "1000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"post" : { "post" : {
@ -1381,7 +1381,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000", "currentGasLimit" : "1000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1417,7 +1417,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "100000000", "currentGasLimit" : "100000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1453,7 +1453,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "10000000", "currentGasLimit" : "10000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1490,7 +1490,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "10000000", "currentGasLimit" : "10000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1533,7 +1533,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "100000000", "currentGasLimit" : "100000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1570,7 +1570,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "10000000", "currentGasLimit" : "10000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1613,7 +1613,7 @@
"currentGasLimit" : "(2**256)-1", "currentGasLimit" : "(2**256)-1",
"currentGasLimit" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", "currentGasLimit" : "115792089237316195423570985008687907853269984665640564039457584007913129639935",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1655,7 +1655,7 @@
"currentGasLimit" : "(2**256)-1", "currentGasLimit" : "(2**256)-1",
"currentGasLimit" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", "currentGasLimit" : "115792089237316195423570985008687907853269984665640564039457584007913129639935",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1695,7 +1695,7 @@
"currentGasLimit" : "(2**256)-1", "currentGasLimit" : "(2**256)-1",
"currentGasLimit" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", "currentGasLimit" : "115792089237316195423570985008687907853269984665640564039457584007913129639935",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1733,7 +1733,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "100000", "currentGasLimit" : "100000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1769,7 +1769,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000000000", "currentGasLimit" : "1000000000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1806,7 +1806,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000000000", "currentGasLimit" : "1000000000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1846,7 +1846,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000000000", "currentGasLimit" : "1000000000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {
@ -1894,7 +1894,7 @@
"currentDifficulty" : "45678256", "currentDifficulty" : "45678256",
"currentGasLimit" : "1000000000000", "currentGasLimit" : "1000000000000",
"currentNumber" : "0", "currentNumber" : "0",
"currentTimestamp" : 1, "currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"expect" : { "expect" : {

1
test/transaction.cpp

@ -40,6 +40,7 @@ void doTransactionTests(json_spirit::mValue& _v, bool _fillin)
{ {
BOOST_REQUIRE(o.count("transaction") > 0); BOOST_REQUIRE(o.count("transaction") > 0);
mObject tObj = o["transaction"].get_obj(); mObject tObj = o["transaction"].get_obj();
o["transaction"] = ImportTest::makeAllFieldsHex(tObj);
//Construct Rlp of the given transaction //Construct Rlp of the given transaction
RLPStream rlpStream = createRLPStreamFromTransactionFields(tObj); RLPStream rlpStream = createRLPStreamFromTransactionFields(tObj);

Loading…
Cancel
Save