From 117f66e82375b752cc6a9ff22aa0d398ac337bb4 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 6 Jan 2015 12:13:57 +0100 Subject: Added license headers --- cmd/evm/main.go | 2 -- 1 file changed, 2 deletions(-) (limited to 'cmd/evm/main.go') diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 31b7da3c8..84ab0dc27 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -17,8 +17,6 @@ /** * @authors * Jeffrey Wilcke - * @date 2014 - * */ package main -- cgit v1.2.3 From be977858562941ed8b8bd96eff65fbca1d1c4e4f Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 6 Jan 2015 11:07:05 +0100 Subject: cmd/evm: add dummy implementation for GetHash Fixes the build. AFAIK evm does not bother keeping a chain and cannot provide a real implementation. --- cmd/evm/main.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmd/evm/main.go') 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) } -- cgit v1.2.3 From fed3e6a808921fb8274b50043c5c39a24a1bbccf Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 7 Jan 2015 13:17:48 +0100 Subject: Refactored ethutil.Config.Db out --- cmd/evm/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cmd/evm/main.go') diff --git a/cmd/evm/main.go b/cmd/evm/main.go index f902c99e5..f819386fe 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -35,7 +35,6 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/ptrie" "github.com/ethereum/go-ethereum/state" "github.com/ethereum/go-ethereum/vm" ) @@ -63,7 +62,7 @@ func main() { ethutil.ReadConfig("/tmp/evmtest", "/tmp/evm", "") db, _ := ethdb.NewMemDatabase() - statedb := state.New(ptrie.New(nil, db)) + statedb := state.New(nil, db) sender := statedb.NewStateObject([]byte("sender")) receiver := statedb.NewStateObject([]byte("receiver")) //receiver.SetCode([]byte(*code)) -- cgit v1.2.3