Skip to content

Commit bcda1e4

Browse files
committed
move back static call check
1 parent dc8e5d6 commit bcda1e4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Nethermind/Nethermind.Evm/Instructions/EvmInstructions.ControlFlow.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@ private static EvmExceptionType InstructionSelfDestruct(VirtualMachine vm, ref E
203203
IReleaseSpec spec = vm.Spec;
204204
IWorldState state = vm.WorldState;
205205

206+
// SELFDESTRUCT is forbidden during static calls.
207+
if (vmState.IsStatic)
208+
goto StaticCallViolation;
209+
206210
// If Shanghai DDoS protection is active, charge the appropriate gas cost.
207211
if (spec.UseShanghaiDDosProtection)
208212
{
@@ -244,10 +248,6 @@ private static EvmExceptionType InstructionSelfDestruct(VirtualMachine vm, ref E
244248
goto OutOfGas;
245249
}
246250

247-
// SELFDESTRUCT is forbidden during static calls.
248-
if (vmState.IsStatic)
249-
goto StaticCallViolation;
250-
251251
// Retrieve the current balance for transfer.
252252
result ??= state.GetBalance(executingAccount);
253253
if (vm.TxTracer.IsTracingActions)

0 commit comments

Comments
 (0)