aboutsummaryrefslogtreecommitdiffstats
path: root/vm.cpp
diff options
context:
space:
mode:
authorCJentzsch <jentzsch.software@gmail.com>2015-01-09 17:58:32 +0800
committerCJentzsch <jentzsch.software@gmail.com>2015-01-09 17:58:32 +0800
commit203005e2b77e0fbaa2cb8003fc85a784628c1866 (patch)
treec09cc8bf29b6d94b443436d8f6bd139da7d9266b /vm.cpp
parent90cdc52ae788d24e79800bf44473f3c8c087c1f4 (diff)
downloaddexon-solidity-203005e2b77e0fbaa2cb8003fc85a784628c1866.tar.gz
dexon-solidity-203005e2b77e0fbaa2cb8003fc85a784628c1866.tar.zst
dexon-solidity-203005e2b77e0fbaa2cb8003fc85a784628c1866.zip
add blockhash test fo vm tests
Diffstat (limited to 'vm.cpp')
-rw-r--r--vm.cpp3
1 files changed, 2 insertions, 1 deletions
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"]);