Skip to content

Commit

Permalink
inline env and l1_block_info fields
Browse files Browse the repository at this point in the history
  • Loading branch information
nbaztec committed Oct 30, 2024
1 parent f73cd96 commit 17cd6e7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/cheatcodes/src/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,16 @@ pub trait CheatcodesExecutor {

// We recreate the EvmContext here to satisfy the lifetime parameters as 'static, with
// regards to the inspector's lifetime.
let error = std::mem::replace(&mut ecx.error, Ok(()));
let l1_block_info = std::mem::take(&mut ecx.l1_block_info);
let mut ecx_inner = EvmContext {
inner: InnerEvmContext {
env: std::mem::replace(&mut ecx.env, Default::default()),
journaled_state: std::mem::replace(
&mut ecx.journaled_state,
revm::JournaledState::new(Default::default(), Default::default()),
),
error: std::mem::replace(&mut ecx.error, Ok(())),
l1_block_info: std::mem::take(&mut ecx.l1_block_info),
db: &mut ecx.db as &mut dyn DatabaseExt,
error,
l1_block_info,
},
precompiles: Default::default(),
};
Expand Down

0 comments on commit 17cd6e7

Please sign in to comment.