diff --git a/crates/uplc/src/machine/eval_result.rs b/crates/uplc/src/machine/eval_result.rs index c35c860ba..2841e5645 100644 --- a/crates/uplc/src/machine/eval_result.rs +++ b/crates/uplc/src/machine/eval_result.rs @@ -34,9 +34,9 @@ impl EvalResult { pub fn failed(&self, can_error: bool) -> bool { if can_error { - !matches!(self.result, Err(_)) + self.result.is_ok() } else { - matches!(self.result, Err(_)) + self.result.is_err() || matches!(self.result, Ok(Term::Error)) || matches!(self.result, Ok(Term::Constant(ref con)) if matches!(con.as_ref(), Constant::Bool(false))) }