Skip to content

Commit

Permalink
Merge #2700: Fix kani test
Browse files Browse the repository at this point in the history
e47e57c Fix kani test (Tobin C. Harding)

Pull request description:

  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.

ACKs for top commit:
  apoelstra:
    ACK e47e57c

Tree-SHA512: b0b4ace6d66dbbd30df3da1cbc233bfa994e7e003e049e949af4ab03b01c09d0cc29fd40d84a93a7d41e94751da91407e391c80d3de7064e9ac23485273309a6
  • Loading branch information
apoelstra committed Apr 18, 2024
2 parents 3aecf94 + e47e57c commit 2df6b01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion units/src/amount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
},
);
}
Expand Down

0 comments on commit 2df6b01

Please sign in to comment.