Skip to content

Commit

Permalink
add comments, remove TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
rakita committed May 31, 2024
1 parent c73a411 commit 8092762
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/revm/src/inspector/handler_register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ pub fn inspector_handle_register<DB: Database, EXT: GetInspector<DB>>(
},
);

// TODO(EOF) EOF create call.
// Calls inspector `eofcreate` and `initialize_interp` functions. Queues the inputs for the `eofcreate_end`` function.
// Calls the old handler, and in case of inspector returning outcome,
// returns the outcome without executing eofcreate.
let eofcreate_input_stack_inner = eofcreate_input_stack.clone();
let old_handle = handler.execution.eofcreate.clone();
handler.execution.eofcreate = Arc::new(
Expand All @@ -188,7 +190,8 @@ pub fn inspector_handle_register<DB: Database, EXT: GetInspector<DB>>(
},
);

// eofcreate outcome
// Pops eofcreate input from the stack and calls inspector `eofcreate_end` function.
// preserve the old handler and calls it with the outcome.
let eofcreate_input_stack_inner = eofcreate_input_stack.clone();
let old_handle = handler.execution.insert_eofcreate_outcome.clone();
handler.execution.insert_eofcreate_outcome = Arc::new(move |ctx, frame, mut outcome| {
Expand Down

0 comments on commit 8092762

Please sign in to comment.