diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-13 06:26:58 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-13 06:26:58 +0800 |
commit | 80592f244da3f7323b7fa3e75a17c8e37c97fe8d (patch) | |
tree | c003c01b819355eaaada7a93dbb28e578c7fb95c /vm | |
parent | 3a88da578fc25843308e02ebc3c1d5c431f81820 (diff) | |
download | go-tangerine-80592f244da3f7323b7fa3e75a17c8e37c97fe8d.tar.gz go-tangerine-80592f244da3f7323b7fa3e75a17c8e37c97fe8d.tar.zst go-tangerine-80592f244da3f7323b7fa3e75a17c8e37c97fe8d.zip |
more obvious failure for ethtest
Diffstat (limited to 'vm')
-rw-r--r-- | vm/environment.go | 2 | ||||
-rw-r--r-- | vm/vm.go | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/vm/environment.go b/vm/environment.go index 5b4d6c8f0..69832241f 100644 --- a/vm/environment.go +++ b/vm/environment.go @@ -36,10 +36,12 @@ type Account interface { SubBalance(amount *big.Int) AddBalance(amount *big.Int) Balance() *big.Int + Address() []byte } // generic transfer method func Transfer(from, to Account, amount *big.Int) error { + //fmt.Printf(":::%x::: %v < %v\n", from.Address(), from.Balance(), amount) if from.Balance().Cmp(amount) < 0 { return errors.New("Insufficient balance in account") } @@ -380,7 +380,7 @@ func (self *Vm) Run(me, caller ContextRef, code []byte, value, gas, price *big.I // 0x20 range case SHA3: - size, offset := stack.pop(), stack.pop() + offset, size := stack.pop(), stack.pop() data := crypto.Sha3(mem.Get(offset.Int64(), size.Int64())) stack.push(ethutil.BigD(data)) |