From 203005e2b77e0fbaa2cb8003fc85a784628c1866 Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Fri, 9 Jan 2015 10:58:32 +0100 Subject: add blockhash test fo vm tests --- vm.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vm.cpp') diff --git a/vm.cpp b/vm.cpp index 18bf5797..6ae95f25 100644 --- a/vm.cpp +++ b/vm.cpp @@ -33,7 +33,7 @@ using namespace dev::eth; using namespace dev::test; FakeExtVM::FakeExtVM(eth::BlockInfo const& _previousBlock, eth::BlockInfo const& _currentBlock, unsigned _depth): /// TODO: XXX: remove the default argument & fix. - ExtVMFace(Address(), Address(), Address(), 0, 1, bytesConstRef(), bytes(), _previousBlock, _currentBlock, LastHashes(), _depth) {} + ExtVMFace(Address(), Address(), Address(), 0, 1, bytesConstRef(), bytes(), _previousBlock, _currentBlock, test::lastHashes(_currentBlock.number), _depth) {} h160 FakeExtVM::create(u256 _endowment, u256& io_gas, bytesConstRef _init, OnOpFunc const&) { @@ -117,6 +117,7 @@ void FakeExtVM::importEnv(mObject& _o) previousBlock.hash = h256(_o["previousHash"].get_str()); currentBlock.number = toInt(_o["currentNumber"]); + lastHashes = test::lastHashes(currentBlock.number); currentBlock.gasLimit = toInt(_o["currentGasLimit"]); currentBlock.difficulty = toInt(_o["currentDifficulty"]); currentBlock.timestamp = toInt(_o["currentTimestamp"]); -- cgit v1.2.3