Skip to content

Commit

Permalink
Prevent exiting substate on top level create function (#168)
Browse files Browse the repository at this point in the history
* Prevent exiting substate on top level create function

* `transact_create2`
  • Loading branch information
tgmichel authored May 30, 2023
1 parent a14b6b0 commit 5f6b051
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/executor/stack/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,6 @@ impl<'config, 'precompiles, S: StackState<'config>, P: PrecompileSet>
if let Some(limit) = self.config.max_initcode_size {
if init_code.len() > limit {
self.state.metadata_mut().gasometer.fail();
let _ = self.exit_substate(StackExitKind::Failed);
return emit_exit!(ExitError::CreateContractLimit.into(), Vec::new());
}
}
Expand Down Expand Up @@ -476,7 +475,6 @@ impl<'config, 'precompiles, S: StackState<'config>, P: PrecompileSet>
if let Some(limit) = self.config.max_initcode_size {
if init_code.len() > limit {
self.state.metadata_mut().gasometer.fail();
let _ = self.exit_substate(StackExitKind::Failed);
return emit_exit!(ExitError::CreateContractLimit.into(), Vec::new());
}
}
Expand Down

0 comments on commit 5f6b051

Please sign in to comment.