diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-03-07 18:10:21 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-03-07 18:10:21 +0800 |
commit | dab392876af4ecb73f7f322c825c9a0d411b59ca (patch) | |
tree | 7e9b6d0a1ffaf0901bdc560a8b5efb30e9ed3462 | |
parent | 2f699b222b4d687f1b63ea8c1fefa190d4e45069 (diff) | |
parent | 986fdb9d5fef87769caa140d9b4903178cf1874a (diff) | |
download | dexon-solidity-dab392876af4ecb73f7f322c825c9a0d411b59ca.tar dexon-solidity-dab392876af4ecb73f7f322c825c9a0d411b59ca.tar.gz dexon-solidity-dab392876af4ecb73f7f322c825c9a0d411b59ca.tar.bz2 dexon-solidity-dab392876af4ecb73f7f322c825c9a0d411b59ca.tar.lz dexon-solidity-dab392876af4ecb73f7f322c825c9a0d411b59ca.tar.xz dexon-solidity-dab392876af4ecb73f7f322c825c9a0d411b59ca.tar.zst dexon-solidity-dab392876af4ecb73f7f322c825c9a0d411b59ca.zip |
Merge branch 'develop' into new_jsonrpc
Conflicts:
libweb3jsonrpc/WebThreeStubServerBase.cpp
-rw-r--r-- | blockchain.cpp | 13 | ||||
-rw-r--r-- | dagger.cpp | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/blockchain.cpp b/blockchain.cpp index 7f840bc7..ccbc8495 100644 --- a/blockchain.cpp +++ b/blockchain.cpp @@ -87,6 +87,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) // get txs TransactionQueue txs; + GasPricer gp(10000); BOOST_REQUIRE(blObj.count("transactions")); for (auto const& txObj: blObj["transactions"].get_array()) { @@ -131,7 +132,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) try { state.sync(bc); - state.sync(bc,txs); + state.sync(bc, txs, gp); state.commitToMine(bc); MineInfo info; for (info.completed = false; !info.completed; info = state.mine()) {} @@ -281,7 +282,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) BlockInfo blockHeaderFromFields; const bytes c_rlpBytesBlockHeader = createBlockRLPFromFields(tObj); const RLP c_blockHeaderRLP(c_rlpBytesBlockHeader); - blockHeaderFromFields.populateFromHeader(c_blockHeaderRLP, false); + blockHeaderFromFields.populateFromHeader(c_blockHeaderRLP, IgnoreNonce); BlockInfo blockFromRlp = bc.info(); @@ -381,7 +382,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) BlockInfo uncleBlockHeader; try { - uncleBlockHeader.populateFromHeader(c_uRLP, true); + uncleBlockHeader.populateFromHeader(c_uRLP); } catch(...) { @@ -395,7 +396,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) for (auto const& uRLP: root[2]) { BlockInfo uBl; - uBl.populateFromHeader(uRLP, true); + uBl.populateFromHeader(uRLP); uBlHsFromRlp.push_back(uBl); } @@ -538,7 +539,7 @@ void overwriteBlockHeader(BlockInfo& _current_BlockHeader, mObject& _blObj) // take the blockheader as is const bytes c_blockRLP = createBlockRLPFromFields(_blObj["blockHeader"].get_obj()); const RLP c_bRLP(c_blockRLP); - _current_BlockHeader.populateFromHeader(c_bRLP, false); + _current_BlockHeader.populateFromHeader(c_bRLP, IgnoreNonce); } } @@ -551,7 +552,7 @@ BlockInfo constructBlock(mObject& _o) // construct genesis block const bytes c_blockRLP = createBlockRLPFromFields(_o); const RLP c_bRLP(c_blockRLP); - ret.populateFromHeader(c_bRLP, false); + ret.populateFromHeader(c_bRLP, IgnoreNonce); } catch (Exception const& _e) { @@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE(basic_test) cnote << i.first; js::mObject& o = i.second.get_obj(); vector<pair<string, string>> ss; - BlockInfo header = BlockInfo::fromHeader(fromHex(o["header"].get_str())); + BlockInfo header = BlockInfo::fromHeader(fromHex(o["header"].get_str()), CheckNothing); h256 headerHash(o["header_hash"].get_str()); Nonce nonce(o["nonce"].get_str()); BOOST_REQUIRE_EQUAL(headerHash, header.headerHash(WithoutNonce)); |