aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/vm.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-04-11 06:14:19 +0800
committerobscuren <geffobscura@gmail.com>2014-04-11 06:14:19 +0800
commit891f7259091cba0fe5e8c9370e7b0b1055b56683 (patch)
tree216326e73f2c3c893b942ed7c016d2327c1367e2 /ethchain/vm.go
parent969e748dce5562fc543990b6911d53ab699e393e (diff)
downloaddexon-891f7259091cba0fe5e8c9370e7b0b1055b56683.tar
dexon-891f7259091cba0fe5e8c9370e7b0b1055b56683.tar.gz
dexon-891f7259091cba0fe5e8c9370e7b0b1055b56683.tar.bz2
dexon-891f7259091cba0fe5e8c9370e7b0b1055b56683.tar.lz
dexon-891f7259091cba0fe5e8c9370e7b0b1055b56683.tar.xz
dexon-891f7259091cba0fe5e8c9370e7b0b1055b56683.tar.zst
dexon-891f7259091cba0fe5e8c9370e7b0b1055b56683.zip
Added better address format
Diffstat (limited to 'ethchain/vm.go')
-rw-r--r--ethchain/vm.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/ethchain/vm.go b/ethchain/vm.go
index f94425d2d..dd99ee790 100644
--- a/ethchain/vm.go
+++ b/ethchain/vm.go
@@ -301,7 +301,6 @@ func (vm *Vm) RunClosure(closure *Closure) []byte {
// 0x50 range
case oPUSH: // Push PC+1 on to the stack
pc.Add(pc, ethutil.Big1)
- //val := closure.GetMem(pc).BigInt()
data := closure.Gets(pc, big.NewInt(32))
val := ethutil.BigD(data.Bytes())
@@ -309,6 +308,16 @@ func (vm *Vm) RunClosure(closure *Closure) []byte {
stack.Push(val)
pc.Add(pc, big.NewInt(31))
+ case oPUSH20:
+ pc.Add(pc, ethutil.Big1)
+ data := closure.Gets(pc, big.NewInt(20))
+ val := ethutil.BigD(data.Bytes())
+
+ // Push value to stack
+ stack.Push(val)
+
+ pc.Add(pc, big.NewInt(19))
+
case oPOP:
stack.Pop()
case oDUP: