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 JacekGlen committed May 26, 2022
1 parent d2dd044 commit fc16f21
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
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion core/vm/jump_table.go
Expand Up @@ -996,7 +996,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 fc16f21

Please sign in to comment.