Skip to content

Commit

Permalink
fix: don't record the call error twice if we hit the max depth (#1953)
Browse files Browse the repository at this point in the history
We'll record the trace error in `call_actor` itself.
  • Loading branch information
Stebalien authored Dec 15, 2023
1 parent a8f9be1 commit 40bdf9c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions fvm/src/call_manager/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -919,11 +919,9 @@ where
F: FnOnce(&mut Self) -> Result<V>,
{
if self.call_stack_depth >= self.machine.context().max_call_depth {
let sys_err = syscall_error!(LimitExceeded, "message execution exceeds call depth");
if self.machine.context().tracing {
self.trace(ExecutionEvent::CallError(sys_err.clone()));
}
return Err(sys_err.into());
return Err(
syscall_error!(LimitExceeded, "message execution exceeds call depth").into(),
);
}

self.call_stack_depth += 1;
Expand Down

0 comments on commit 40bdf9c

Please sign in to comment.