Skip to content

Commit

Permalink
core/vm: rename opSuicide to opSelfdestruct (ethereum#24022)
Browse files Browse the repository at this point in the history
The opcode was renamed in the codebase in 2017, but the functions were kept unchanged.
  • Loading branch information
axic authored and gzliudan committed Mar 1, 2024
1 parent bfbb678 commit b1c0386
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/vm/instructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ func opStop(pc *uint64, interpreter *EVMInterpreter, callContext *callCtx) ([]by
return nil, errStopToken
}

func opSuicide(pc *uint64, interpreter *EVMInterpreter, callContext *callCtx) ([]byte, error) {
func opSelfdestruct(pc *uint64, interpreter *EVMInterpreter, callContext *callCtx) ([]byte, error) {
if interpreter.readOnly {
return nil, ErrWriteProtection
}
Expand Down
2 changes: 1 addition & 1 deletion core/vm/jump_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ func newFrontierInstructionSet() JumpTable {
memorySize: memoryReturn,
},
SELFDESTRUCT: {
execute: opSuicide,
execute: opSelfdestruct,
dynamicGas: gasSelfdestruct,
minStack: minStack(1, 0),
maxStack: maxStack(1, 0),
Expand Down

0 comments on commit b1c0386

Please sign in to comment.