aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/vm.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-04-10 00:27:54 +0800
committerobscuren <geffobscura@gmail.com>2014-04-10 00:27:54 +0800
commite09f0a5f2c1e1b46226656dbac9a4ae10e0dcd14 (patch)
tree7b1ce2f5cd83e3a345cf26230afd41e48110e015 /ethchain/vm.go
parent4f2e9c2640eaa962d085db329221bfd6f1a1799e (diff)
downloadgo-tangerine-e09f0a5f2c1e1b46226656dbac9a4ae10e0dcd14.tar
go-tangerine-e09f0a5f2c1e1b46226656dbac9a4ae10e0dcd14.tar.gz
go-tangerine-e09f0a5f2c1e1b46226656dbac9a4ae10e0dcd14.tar.bz2
go-tangerine-e09f0a5f2c1e1b46226656dbac9a4ae10e0dcd14.tar.lz
go-tangerine-e09f0a5f2c1e1b46226656dbac9a4ae10e0dcd14.tar.xz
go-tangerine-e09f0a5f2c1e1b46226656dbac9a4ae10e0dcd14.tar.zst
go-tangerine-e09f0a5f2c1e1b46226656dbac9a4ae10e0dcd14.zip
Split code for contracts
Diffstat (limited to 'ethchain/vm.go')
-rw-r--r--ethchain/vm.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/ethchain/vm.go b/ethchain/vm.go
index b4b2177bf..a6a02dc9f 100644
--- a/ethchain/vm.go
+++ b/ethchain/vm.go
@@ -72,7 +72,7 @@ func (vm *Vm) RunClosure(closure *Closure) []byte {
for {
step++
// Get the memory location of pc
- val := closure.GetInstr(pc)
+ val := closure.Get(pc)
// Get the opcode (it must be an opcode!)
op := OpCode(val.Uint())
if ethutil.Config.Debug {
@@ -357,7 +357,7 @@ func (vm *Vm) RunClosure(closure *Closure) []byte {
// Fetch the contract which will serve as the closure body
contract := vm.state.GetContract(addr.Bytes())
// Create a new callable closure
- closure := NewClosure(closure, contract, vm.state, gas, value)
+ closure := NewClosure(closure, contract, contract.script, vm.state, gas, value)
// Executer the closure and get the return value (if any)
ret := closure.Call(vm, args)