diff options
author | Felix Lange <fjl@twurst.com> | 2015-01-06 18:07:05 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-01-06 19:23:37 +0800 |
commit | be977858562941ed8b8bd96eff65fbca1d1c4e4f (patch) | |
tree | 8d7140104d227ee72d9bec21e9a46f3e431deda7 /cmd/evm | |
parent | fde0ddb324788a51a94bd0f605bb8f935db2f7f4 (diff) | |
download | dexon-be977858562941ed8b8bd96eff65fbca1d1c4e4f.tar dexon-be977858562941ed8b8bd96eff65fbca1d1c4e4f.tar.gz dexon-be977858562941ed8b8bd96eff65fbca1d1c4e4f.tar.bz2 dexon-be977858562941ed8b8bd96eff65fbca1d1c4e4f.tar.lz dexon-be977858562941ed8b8bd96eff65fbca1d1c4e4f.tar.xz dexon-be977858562941ed8b8bd96eff65fbca1d1c4e4f.tar.zst dexon-be977858562941ed8b8bd96eff65fbca1d1c4e4f.zip |
cmd/evm: add dummy implementation for GetHash
Fixes the build. AFAIK evm does not bother keeping a chain and
cannot provide a real implementation.
Diffstat (limited to 'cmd/evm')
-rw-r--r-- | cmd/evm/main.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 84ab0dc27..f902c99e5 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -131,6 +131,12 @@ func (self *VMEnv) Value() *big.Int { return self.value } func (self *VMEnv) GasLimit() *big.Int { return big.NewInt(1000000000) } func (self *VMEnv) Depth() int { return 0 } func (self *VMEnv) SetDepth(i int) { self.depth = i } +func (self *VMEnv) GetHash(n uint64) []byte { + if self.block.Number().Cmp(big.NewInt(int64(n))) == 0 { + return self.block.Hash() + } + return nil +} func (self *VMEnv) AddLog(log state.Log) { self.state.AddLog(log) } |