aboutsummaryrefslogtreecommitdiffstats
path: root/core/execution.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-13 20:44:15 +0800
committerobscuren <geffobscura@gmail.com>2015-03-13 20:44:15 +0800
commitf76cc6699ecd995d78cfd980b229473101191137 (patch)
treed91ea0c1725b080062cb6eb2b294e61af02cacc2 /core/execution.go
parent80592f244da3f7323b7fa3e75a17c8e37c97fe8d (diff)
downloadgo-tangerine-f76cc6699ecd995d78cfd980b229473101191137.tar.gz
go-tangerine-f76cc6699ecd995d78cfd980b229473101191137.tar.zst
go-tangerine-f76cc6699ecd995d78cfd980b229473101191137.zip
Changed context and ADDMOD, MULMOD
* Cleaned up VM execution. VM run now takes a context * ADDMOD/MULMOD - removed incorrect cast
Diffstat (limited to 'core/execution.go')
-rw-r--r--core/execution.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/execution.go b/core/execution.go
index 8f2b5bee1..be45eeeb4 100644
--- a/core/execution.go
+++ b/core/execution.go
@@ -59,7 +59,11 @@ func (self *Execution) exec(code, contextAddr []byte, caller vm.ContextRef) (ret
snapshot := env.State().Copy()
start := time.Now()
- ret, err = evm.Run(to, caller, code, self.value, self.Gas, self.price, self.input)
+
+ context := vm.NewContext(caller, to, self.value, self.Gas, self.price)
+ context.SetCallCode(contextAddr, code)
+
+ ret, err = evm.Run(context, self.input) //self.value, self.Gas, self.price, self.input)
chainlogger.Debugf("vm took %v\n", time.Since(start))
if err != nil {
env.State().Set(snapshot)