From e47e57c265baca76ee04312bd6acc3c907a49089 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 19 Apr 2024 06:15:49 +1000 Subject: [PATCH] Fix kani test In a kani test we are checking if the result of `to_unsigned()` is an error but setting `is_signed` to `true`, this field represents the signed-ness of the return type of `to_unsigned` (`Amount`) so should be `false`. Fix kani daily job. --- units/src/amount.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/units/src/amount.rs b/units/src/amount.rs index cdfbb6b9..2f9300ff 100644 --- a/units/src/amount.rs +++ b/units/src/amount.rs @@ -1973,7 +1973,7 @@ mod verification { if n1 >= 0 { Ok(Amount::from_sat(n1.try_into().unwrap())) } else { - Err(OutOfRangeError { is_signed: true, is_greater_than_max: false }) + Err(OutOfRangeError { is_signed: false, is_greater_than_max: false }) }, ); }