Browse Source

All fields Hex: style

cl-refactor
winsvega 10 years ago
parent
commit
33e4026095
  1. 14
      test/TestHelper.cpp
  2. 2
      test/transaction.cpp
  3. 2
      test/ttTransactionTestFiller.json

14
test/TestHelper.cpp

@ -121,18 +121,18 @@ ImportTest::ImportTest(json_spirit::mObject& _o, bool isFiller):
json_spirit::mObject& ImportTest::makeAllFieldsHex(json_spirit::mObject& _o)
{
static const std::string hashes[] = {"bloom" , "coinbase", "hash", "mixHash", "parentHash", "receiptTrie",
"stateRoot", "transactionsTrie", "uncleHash", "currentCoinbase",
"previousHash", "to", "address", "caller", "origin", "secretKey"};
static const set<string> hashes {"bloom" , "coinbase", "hash", "mixHash", "parentHash", "receiptTrie",
"stateRoot", "transactionsTrie", "uncleHash", "currentCoinbase",
"previousHash", "to", "address", "caller", "origin", "secretKey"};
for (json_spirit::mObject::iterator it = _o.begin(); it != _o.end(); it++)
for (auto& i: _o)
{
std::string key = (*it).first;
if (std::find(std::begin(hashes), std::end(hashes), key) != std::end(hashes))
std::string key = i.first;
if (hashes.count(key))
continue;
std::string str;
json_spirit::mValue value = (*it).second;
json_spirit::mValue value = i.second;
if (value.type() == json_spirit::int_type)
str = toString(value.get_int());

2
test/transaction.cpp

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

2
test/ttTransactionTestFiller.json

@ -176,7 +176,7 @@
},
"SenderTest" : {
"//" : "sender 0f65fe9276bc9a24ae7083ae28e2660ef72df99e",
"senderExpect" : "sender 0f65fe9276bc9a24ae7083ae28e2660ef72df99e",
"expect" : "valid",
"transaction" :
{

Loading…
Cancel
Save