diff options
author | subtly <subtly@users.noreply.github.com> | 2015-04-06 04:42:51 +0800 |
---|---|---|
committer | subtly <subtly@users.noreply.github.com> | 2015-04-06 04:42:51 +0800 |
commit | 052fa7d877a589dd32921e4ac8aadb45d94f1185 (patch) | |
tree | e21a5bea1944d9606599fe09a4ed4e647073d0de /blockchain.cpp | |
parent | 4597ae7260752ac4bddfe7eb0737088d4fcb3ed7 (diff) | |
parent | a2507495052d39ef4ddfc6fc256b29e063a81eb6 (diff) | |
download | dexon-solidity-052fa7d877a589dd32921e4ac8aadb45d94f1185.tar dexon-solidity-052fa7d877a589dd32921e4ac8aadb45d94f1185.tar.gz dexon-solidity-052fa7d877a589dd32921e4ac8aadb45d94f1185.tar.bz2 dexon-solidity-052fa7d877a589dd32921e4ac8aadb45d94f1185.tar.lz dexon-solidity-052fa7d877a589dd32921e4ac8aadb45d94f1185.tar.xz dexon-solidity-052fa7d877a589dd32921e4ac8aadb45d94f1185.tar.zst dexon-solidity-052fa7d877a589dd32921e4ac8aadb45d94f1185.zip |
Merge branch 'develop' into whisper
Diffstat (limited to 'blockchain.cpp')
-rw-r--r-- | blockchain.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/blockchain.cpp b/blockchain.cpp index ffb55da3..50c17bde 100644 --- a/blockchain.cpp +++ b/blockchain.cpp @@ -52,7 +52,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) BOOST_REQUIRE(o.count("pre")); ImportTest importer(o["pre"].get_obj()); - State state(biGenesisBlock.coinbaseAddress, OverlayDB(), BaseState::Empty); + State state(OverlayDB(), BaseState::Empty, biGenesisBlock.coinbaseAddress); importer.importState(o["pre"].get_obj(), state); o["pre"] = fillJsonWithState(state); state.commit(); @@ -98,7 +98,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) { mObject tx = txObj.get_obj(); importer.importTransaction(tx); - if (!txs.attemptImport(importer.m_transaction.rlp())) + if (txs.import(importer.m_transaction.rlp()) != ImportResult::Success) cnote << "failed importing transaction\n"; } @@ -599,7 +599,7 @@ void updatePoW(BlockInfo& _bi) ret = pow.mine(_bi, 10000, true, true); Ethash::assignResult(ret.second, _bi); } - _bi.hash = _bi.headerHash(WithNonce); + _bi.noteDirty(); } void writeBlockHeaderToJson(mObject& _o, BlockInfo const& _bi) @@ -619,7 +619,7 @@ void writeBlockHeaderToJson(mObject& _o, BlockInfo const& _bi) _o["extraData"] ="0x" + toHex(_bi.extraData); _o["mixHash"] = toString(_bi.mixHash); _o["nonce"] = toString(_bi.nonce); - _o["hash"] = toString(_bi.hash); + _o["hash"] = toString(_bi.hash()); } RLPStream createFullBlockFromHeader(BlockInfo const& _bi, bytes const& _txs, bytes const& _uncles) |