From 4fb79279b6b30c7a6b99a96991f354bab7219471 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 29 Nov 2021 18:01:30 +0000 Subject: [PATCH] core/vm: Rename opSuicide to opSelfdestruct The opcode was renamed in the codebase in 2017, but the functions were kept unchanged. --- core/vm/instructions.go | 2 +- core/vm/jump_table.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 350baecff8ca..a47083646154 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -793,7 +793,7 @@ func opStop(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byt return nil, errStopToken } -func opSuicide(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { +func opSelfdestruct(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { beneficiary := scope.Stack.pop() balance := interpreter.evm.StateDB.GetBalance(scope.Contract.Address()) interpreter.evm.StateDB.AddBalance(beneficiary.Bytes20(), balance) diff --git a/core/vm/jump_table.go b/core/vm/jump_table.go index bcc15beb234b..63c7e0f98259 100644 --- a/core/vm/jump_table.go +++ b/core/vm/jump_table.go @@ -1006,7 +1006,7 @@ func newFrontierInstructionSet() JumpTable { memorySize: memoryReturn, }, SELFDESTRUCT: { - execute: opSuicide, + execute: opSelfdestruct, dynamicGas: gasSelfdestruct, minStack: minStack(1, 0), maxStack: maxStack(1, 0),