Skip to content

Commit 0ca6564

Browse files
authored
chore: rename SELFDESTRUCT to SELFDESTRUCT_REFUND (#2937)
* chore(revm-interpreter): rename SELFDESTRUCT to REFUND_SELFDESTRUCT * Update crates/interpreter/src/gas/constants.rs * Update crates/interpreter/src/instructions/host.rs
1 parent f9ebc5f commit 0ca6564

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

crates/interpreter/src/gas/constants.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ pub const MID: u64 = 8;
2323
pub const HIGH: u64 = 10;
2424
/// Gas cost for JUMPDEST instruction.
2525
pub const JUMPDEST: u64 = 1;
26-
/// Gas cost for SELFDESTRUCT instruction.
27-
pub const SELFDESTRUCT: i64 = 24000;
26+
/// Gas cost for REFUND SELFDESTRUCT instruction.
27+
pub const SELFDESTRUCT_REFUND: i64 = 24000;
2828
/// Gas cost for CREATE instruction.
2929
pub const CREATE: u64 = 32000;
3030
/// Additional gas cost when a call transfers value.

crates/interpreter/src/instructions/host.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,10 @@ pub fn selfdestruct<WIRE: InterpreterTypes, H: Host + ?Sized>(
419419
.is_enabled_in(LONDON)
420420
&& !res.previously_destroyed
421421
{
422-
context.interpreter.gas.record_refund(gas::SELFDESTRUCT)
422+
context
423+
.interpreter
424+
.gas
425+
.record_refund(gas::SELFDESTRUCT_REFUND);
423426
}
424427

425428
context.interpreter.halt(InstructionResult::SelfDestruct);

0 commit comments

Comments
 (0)