more obvious failure for ethtest
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
2
vm/vm.go
2
vm/vm.go
@@ -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))
|
||||
|
Reference in New Issue
Block a user