From 2be129b5cf6b71558b0109b26e9a24d3b4f47705 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 1 Dec 2021 09:33:29 +0000 Subject: [PATCH] core/vm: rename opSuicide to opSelfdestruct (#24022) 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 f9e1186ed..cc225e484 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -805,7 +805,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) { if interpreter.readOnly { return nil, ErrWriteProtection } diff --git a/core/vm/jump_table.go b/core/vm/jump_table.go index d3427f432..676cfc060 100644 --- a/core/vm/jump_table.go +++ b/core/vm/jump_table.go @@ -996,7 +996,7 @@ func newFrontierInstructionSet() JumpTable { memorySize: memoryReturn, }, SELFDESTRUCT: { - execute: opSuicide, + execute: opSelfdestruct, dynamicGas: gasSelfdestruct, minStack: minStack(1, 0), maxStack: maxStack(1, 0),