diff --git a/manager/burrow-mint/evm/opcodes/opcodes.go b/manager/burrow-mint/evm/opcodes/opcodes.go index d633b5e5f717fe034dc5b065d6f4c461a8203a0a..0debc94ec780e70dc6db6448317b684bcb44e34d 100644 --- a/manager/burrow-mint/evm/opcodes/opcodes.go +++ b/manager/burrow-mint/evm/opcodes/opcodes.go @@ -185,7 +185,7 @@ const ( DELEGATECALL // 0x70 range - other - SUICIDE = 0xff + SELFDESTRUCT = 0xff ) // Since the opcodes aren't all in order we can't use a regular slice @@ -340,7 +340,7 @@ var opCodeToString = map[OpCode]string{ DELEGATECALL: "DELEGATECALL", // 0x70 range - other - SUICIDE: "SUICIDE", + SELFDESTRUCT: "SELFDESTRUCT", } func (o OpCode) String() string { diff --git a/manager/burrow-mint/evm/vm.go b/manager/burrow-mint/evm/vm.go index b5696651ee32187ca19d632b6ce9e8460802c9ea..26d4d196c761b7828da4d602ffb8d0d2db71e2c9 100644 --- a/manager/burrow-mint/evm/vm.go +++ b/manager/burrow-mint/evm/vm.go @@ -907,7 +907,7 @@ func (vm *VM) call(caller, callee *Account, code, input []byte, value int64, gas output = copyslice(ret) return output, nil - case SUICIDE: // 0xFF + case SELFDESTRUCT: // 0xFF addr := stack.Pop() if useGasNegative(gas, GasGetAccount, &err) { return nil, err diff --git a/manager/burrow-mint/state/block_cache.go b/manager/burrow-mint/state/block_cache.go index 3ba8a456447db7e6256e13383ba68f6977297add..0ec90b73de7b2510a02e69d7ffdc036231c297c0 100644 --- a/manager/burrow-mint/state/block_cache.go +++ b/manager/burrow-mint/state/block_cache.go @@ -224,7 +224,7 @@ func (cache *BlockCache) Sync() { if removed { removed := cache.backend.RemoveAccount([]byte(addrStr)) if !removed { - sanity.PanicCrisis(fmt.Sprintf("Could not remove account to be removed: %X", acc.Address)) + sanity.PanicCrisis(fmt.Sprintf("Could not remove account to be removed: %X", addrStr)) } } else { if acc == nil { diff --git a/manager/burrow-mint/state/state_test.go b/manager/burrow-mint/state/state_test.go index c56966b6bdfff4d964ec9885f2a6aa6a871481b7..2ecd60ff3f8f1094646f949f783c1a1df4ef9962 100644 --- a/manager/burrow-mint/state/state_test.go +++ b/manager/burrow-mint/state/state_test.go @@ -744,7 +744,7 @@ proof-of-work chain as proof of what happened while they were gone ` } -func TestSuicide(t *testing.T) { +func TestSelfDestruct(t *testing.T) { state, privAccounts, _ := RandGenesisState(3, true, 1000, 1, true, 1000) @@ -756,14 +756,14 @@ func TestSuicide(t *testing.T) { newAcc1 := state.GetAccount(acc1.Address) - // store 0x1 at 0x1, push an address, then suicide :) + // store 0x1 at 0x1, push an address, then self-destruct:) contractCode := []byte{0x60, 0x01, 0x60, 0x01, 0x55, 0x73} contractCode = append(contractCode, acc2.Address...) contractCode = append(contractCode, 0xff) newAcc1.Code = contractCode state.UpdateAccount(newAcc1) - // send call tx with no data, cause suicide + // send call tx with no data, cause self-destruct tx := txs.NewCallTxWithNonce(acc0PubKey, acc1.Address, nil, sendingAmount, 1000, 0, acc0.Sequence+1) tx.Input.Signature = privAccounts[0].Sign(state.ChainID, tx) @@ -773,7 +773,7 @@ func TestSuicide(t *testing.T) { t.Errorf("Got error in executing call transaction, %v", err) } - // if we do it again, we won't get an error, but the suicide + // if we do it again, we won't get an error, but the self-destruct // shouldn't happen twice and the caller should lose fee tx.Input.Sequence += 1 tx.Input.Signature = privAccounts[0].Sign(state.ChainID, tx)