Skip to content

Commit 8092762

Browse files
committed
add comments, remove TODO
1 parent c73a411 commit 8092762

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/revm/src/inspector/handler_register.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ pub fn inspector_handle_register<DB: Database, EXT: GetInspector<DB>>(
161161
},
162162
);
163163

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

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

0 commit comments

Comments
 (0)