aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm_env.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-29 03:03:25 +0800
committerobscuren <geffobscura@gmail.com>2015-03-29 03:03:25 +0800
commit3b7e4173ce00fb82ee2f186350dd2aca528ea60d (patch)
tree8f80238dd5cbe37919e7a3afcbaf5c6b382c64e6 /core/vm_env.go
parent3ea8c7301e6227467e39ae3daa0f382f06b16fba (diff)
downloaddexon-3b7e4173ce00fb82ee2f186350dd2aca528ea60d.tar.gz
dexon-3b7e4173ce00fb82ee2f186350dd2aca528ea60d.tar.zst
dexon-3b7e4173ce00fb82ee2f186350dd2aca528ea60d.zip
Cleanup VM
Diffstat (limited to 'core/vm_env.go')
-rw-r--r--core/vm_env.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/core/vm_env.go b/core/vm_env.go
index 52e8b20a9..6a604fccd 100644
--- a/core/vm_env.go
+++ b/core/vm_env.go
@@ -54,21 +54,17 @@ func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) error {
return vm.Transfer(from, to, amount)
}
-func (self *VMEnv) vm(addr *common.Address, data []byte, gas, price, value *big.Int) *Execution {
- return NewExecution(self, addr, data, gas, price, value)
-}
-
func (self *VMEnv) Call(me vm.ContextRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) {
- exe := self.vm(&addr, data, gas, price, value)
+ exe := NewExecution(self, &addr, data, gas, price, value)
return exe.Call(addr, me)
}
func (self *VMEnv) CallCode(me vm.ContextRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) {
maddr := me.Address()
- exe := self.vm(&maddr, data, gas, price, value)
+ exe := NewExecution(self, &maddr, data, gas, price, value)
return exe.Call(addr, me)
}
func (self *VMEnv) Create(me vm.ContextRef, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ContextRef) {
- exe := self.vm(nil, data, gas, price, value)
+ exe := NewExecution(self, nil, data, gas, price, value)
return exe.Create(me)
}