diff options
author | arkpar <arkady.paronyan@gmail.com> | 2015-07-18 21:19:15 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2015-07-20 03:11:15 +0800 |
commit | e2a1473d9287a3257d0400ac4d45ab0ce86402f9 (patch) | |
tree | 01252ef7e89871796c097d8fa30e00220ab98a93 /TestHelper.h | |
parent | 522d9f1e46c362967487b7c0aeb986dc0d01bf72 (diff) | |
download | dexon-solidity-e2a1473d9287a3257d0400ac4d45ab0ce86402f9.tar.gz dexon-solidity-e2a1473d9287a3257d0400ac4d45ab0ce86402f9.tar.zst dexon-solidity-e2a1473d9287a3257d0400ac4d45ab0ce86402f9.zip |
tests repared
Diffstat (limited to 'TestHelper.h')
-rw-r--r-- | TestHelper.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/TestHelper.h b/TestHelper.h index 4ac59e91..73553549 100644 --- a/TestHelper.h +++ b/TestHelper.h @@ -27,6 +27,7 @@ #include <boost/filesystem.hpp> #include "JsonSpiritHeaders.h" +#include <libethcore/Ethash.h> #include <libethereum/State.h> #include <libevm/ExtVMFace.h> #include <libtestutils/Common.h> @@ -62,7 +63,7 @@ class State; void mine(Client& c, int numBlocks); void connectClients(Client& c1, Client& c2); void mine(State& _s, BlockChain const& _bc); -void mine(BlockInfo& _bi); +void mine(Ethash::BlockHeader& _bi); } @@ -175,7 +176,21 @@ void checkOutput(bytes const& _output, json_spirit::mObject& _o); void checkStorage(std::map<u256, u256> _expectedStore, std::map<u256, u256> _resultStore, Address _expectedAddr); void checkLog(eth::LogEntries _resultLogs, eth::LogEntries _expectedLogs); void checkCallCreates(eth::Transactions _resultCallCreates, eth::Transactions _expectedCallCreates); - +dev::eth::Ethash::BlockHeader constructHeader( + h256 const& _parentHash, + h256 const& _sha3Uncles, + Address const& _coinbaseAddress, + h256 const& _stateRoot, + h256 const& _transactionsRoot, + h256 const& _receiptsRoot, + dev::eth::LogBloom const& _logBloom, + u256 const& _difficulty, + u256 const& _number, + u256 const& _gasLimit, + u256 const& _gasUsed, + u256 const& _timestamp, + bytes const& _extraData); +void updateEthashSeal(dev::eth::Ethash::BlockHeader& _header, h256 const& _mixHash, dev::eth::Nonce const& _nonce); void executeTests(const std::string& _name, const std::string& _testPathAppendix, const boost::filesystem::path _pathToFiller, std::function<void(json_spirit::mValue&, bool)> doTests); void userDefinedTest(std::function<void(json_spirit::mValue&, bool)> doTests); RLPStream createRLPStreamFromTransactionFields(json_spirit::mObject& _tObj); |