diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 76e34e21d6..4c6059794c 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -32,11 +32,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/vm" ) var ( @@ -157,7 +157,7 @@ func (self *VMEnv) CallCode(caller vm.ContextRef, addr common.Address, data []by return exe.Call(addr, caller) } -func (self *VMEnv) Create(caller vm.ContextRef, addr *common.Address, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ContextRef) { - exe := self.vm(addr, data, gas, price, value) +func (self *VMEnv) Create(caller vm.ContextRef, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ContextRef) { + exe := self.vm(nil, data, gas, price, value) return exe.Create(caller) } diff --git a/core/chain_manager.go b/core/chain_manager.go index 6e8f7b4fe5..f0d3fd4cf7 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -399,7 +399,7 @@ func (self *ChainManager) GetAncestors(block *types.Block, length int) (blocks [ func (bc *ChainManager) setTotalDifficulty(td *big.Int) { bc.blockDb.Put([]byte("LTD"), td.Bytes()) - bc.td.Set(td) + bc.td = td } func (self *ChainManager) CalcTotalDiff(block *types.Block) (*big.Int, error) {