cmd/evm: add dummy implementation for GetHash

Fixes the build. AFAIK evm does not bother keeping a chain and
cannot provide a real implementation.
This commit is contained in:
Felix Lange 2015-01-06 11:07:05 +01:00
parent fde0ddb324
commit be97785856
1 changed files with 6 additions and 0 deletions

View File

@ -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)
}