From 96d3bbd065d69cf5a898f47d02559dce7e906737 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 1 Feb 2024 15:12:41 +1100 Subject: [PATCH] Fix kani test Recently (in #2379) we patched the `ParseAmountError` but we don't check kani code on every pull request so we broke it. Fix kani test to use the new `OutOfRangeError`. Close: #2424 --- units/src/amount.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/units/src/amount.rs b/units/src/amount.rs index 1045038d..bb760b74 100644 --- a/units/src/amount.rs +++ b/units/src/amount.rs @@ -1755,7 +1755,10 @@ mod verification { if n1 >= 0 { Ok(Amount::from_sat(n1.try_into().unwrap())) } else { - Err(ParseAmountError::Negative) + Err(OutOfRangeError { + is_signed: true, + is_greater_than_max: false + }) }, ); }