mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-28 04:01:40 +00:00
fix suicide
This commit is contained in:
9
vm/vm.go
9
vm/vm.go
@ -174,9 +174,6 @@ func (vm *VM) call(caller, callee *Account, code, input []byte, value int64, gas
|
||||
|
||||
switch op {
|
||||
|
||||
case STOP: // 0x00
|
||||
return nil, nil
|
||||
|
||||
case ADD: // 0x01
|
||||
x, y := stack.Pop(), stack.Pop()
|
||||
xb := new(big.Int).SetBytes(x[:])
|
||||
@ -837,7 +834,8 @@ func (vm *VM) call(caller, callee *Account, code, input []byte, value int64, gas
|
||||
if useGasNegative(gas, GasGetAccount, &err) {
|
||||
return nil, err
|
||||
}
|
||||
// TODO if the receiver is , then make it the fee.
|
||||
// TODO if the receiver is , then make it the fee. (?)
|
||||
// TODO: create account if doesn't exist (no reason not to)
|
||||
receiver := vm.appState.GetAccount(addr)
|
||||
if receiver == nil {
|
||||
return nil, firstErr(err, ErrUnknownAddress)
|
||||
@ -849,6 +847,9 @@ func (vm *VM) call(caller, callee *Account, code, input []byte, value int64, gas
|
||||
dbg.Printf(" => (%X) %v\n", addr[:4], balance)
|
||||
fallthrough
|
||||
|
||||
case STOP: // 0x00
|
||||
return nil, nil
|
||||
|
||||
default:
|
||||
dbg.Printf("(pc) %-3v Invalid opcode %X\n", pc, op)
|
||||
return nil, fmt.Errorf("Invalid opcode %X", op)
|
||||
|
Reference in New Issue
Block a user