Merge rust-bitcoin/rust-bitcoin#2430: Fix kani test
4383202f23
CI: Add a job to build kani proofs (Tobin C. Harding)96d3bbd065
Fix kani test (Tobin C. Harding) Pull request description: 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`. EDIT: Attempt, as a separate patch, to add a job that runs on each PR to build the kani test code. Close: #2424 ACKs for top commit: Kixunil: ACK4383202f23
apoelstra: ACK4383202f23
Tree-SHA512: dcddcb0d52201efb3246733e9f164f5acde22df256fc4985b23050628ab9ae9c20a80ecd4ab468558b0a8708dacf6f7af099e8303cf4f73e1557e454c351aa34
This commit is contained in:
commit
05e21a2f39
|
@ -163,3 +163,14 @@ jobs:
|
|||
env:
|
||||
DO_WASM: true
|
||||
run: cd hashes && ./contrib/test.sh
|
||||
|
||||
Kani:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: 'Checkout your code.'
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 'Kani build proofs'
|
||||
uses: model-checking/kani-github-action@v1.1
|
||||
with:
|
||||
args: '--only-codegen'
|
||||
|
|
|
@ -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
|
||||
})
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue