From 596ce49327dab35966e7fbd1b1394e21c0413b60 Mon Sep 17 00:00:00 2001 From: microproofs Date: Fri, 13 Oct 2023 11:40:07 -0400 Subject: [PATCH] fix: mixed up operators for ConstAboveDiagonal and ConstBelowDiagonal Closes #618 --- crates/uplc/src/machine/cost_model.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/uplc/src/machine/cost_model.rs b/crates/uplc/src/machine/cost_model.rs index 3ca2b6ed..507a07cc 100644 --- a/crates/uplc/src/machine/cost_model.rs +++ b/crates/uplc/src/machine/cost_model.rs @@ -3124,7 +3124,7 @@ impl TwoArguments { } } TwoArguments::ConstAboveDiagonal(l) => { - if x > y { + if x < y { l.constant } else { let p = *l.model.clone(); @@ -3132,7 +3132,7 @@ impl TwoArguments { } } TwoArguments::ConstBelowDiagonal(l) => { - if x < y { + if x > y { l.constant } else { let p = *l.model.clone();