diff options
author | winsvega <winsvega@mail.ru> | 2015-04-16 07:03:26 +0800 |
---|---|---|
committer | winsvega <winsvega@mail.ru> | 2015-04-16 21:46:40 +0800 |
commit | 6e97308f27789b553a014adc9afd68c9fddc2e39 (patch) | |
tree | 6400400d0faab30099a9b462811f0b891641f518 | |
parent | 7d44af8b88382f627b812947c997e749b58473e7 (diff) | |
download | dexon-solidity-6e97308f27789b553a014adc9afd68c9fddc2e39.tar dexon-solidity-6e97308f27789b553a014adc9afd68c9fddc2e39.tar.gz dexon-solidity-6e97308f27789b553a014adc9afd68c9fddc2e39.tar.bz2 dexon-solidity-6e97308f27789b553a014adc9afd68c9fddc2e39.tar.lz dexon-solidity-6e97308f27789b553a014adc9afd68c9fddc2e39.tar.xz dexon-solidity-6e97308f27789b553a014adc9afd68c9fddc2e39.tar.zst dexon-solidity-6e97308f27789b553a014adc9afd68c9fddc2e39.zip |
All fields Hex: style
-rw-r--r-- | TestHelper.cpp | 14 | ||||
-rw-r--r-- | transaction.cpp | 2 | ||||
-rw-r--r-- | ttTransactionTestFiller.json | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/TestHelper.cpp b/TestHelper.cpp index 85e45500..92a8258a 100644 --- a/TestHelper.cpp +++ b/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()); diff --git a/transaction.cpp b/transaction.cpp index d38be07f..e73d10cd 100644 --- a/transaction.cpp +++ b/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); diff --git a/ttTransactionTestFiller.json b/ttTransactionTestFiller.json index 1dcc0f94..436d00f1 100644 --- a/ttTransactionTestFiller.json +++ b/ttTransactionTestFiller.json @@ -176,7 +176,7 @@ }, "SenderTest" : { - "//" : "sender 0f65fe9276bc9a24ae7083ae28e2660ef72df99e", + "senderExpect" : "sender 0f65fe9276bc9a24ae7083ae28e2660ef72df99e", "expect" : "valid", "transaction" : { |