rust-bitcoin-unsafe-fast/bitcoin
Jamil Lambert, PhD 6950c0a7b5
Change `Amount::MAX` to equal `MAX_MONEY`
To prevent rounding errors converting to and from f64 change
`Amount::MAX` to `MAX_MONEY` which is below the limit in f64 that has
issues.

Add checks to `from_str_in`, `checked_add` and `checked_mul` that the
result is below MAX, where previously a u64 overflow was relied on.

Change tests to account for new lower MAX that is within the range of
SignedAmount and does not overflow so easily

Remove overflow tests

`Amount::MAX` is now below `u64::MAX` and within the range of values for
`SignedAmount`.   These tests therefore do not overflow.
In effective_value there is no error with `Amount::MAX` and the correct
value is returned.
In psbt the removed test is effectively the same as the previous test.

Modify `Amount` tests to work with new `MAX`

Tests need to be changed that checked values above the new `MAX` or
`Amount::MAX` was out of range for `SignedAmount` which it isn't anymore
2024-12-04 14:17:00 +00:00
..
contrib Remove the SliceIndex implementation from hash types 2024-10-02 10:18:45 +10:00
embedded Move opcodes to primitives 2024-07-09 15:26:33 +10:00
examples Merge rust-bitcoin/rust-bitcoin#3678: Remove unused extern statement 2024-11-29 03:01:13 +00:00
src Change `Amount::MAX` to equal `MAX_MONEY` 2024-12-04 14:17:00 +00:00
tests Fix psbt fuzz crash 2024-11-26 21:35:14 -08:00
CHANGELOG.md bitcoin: Add some upgrade notes 2024-10-27 07:02:30 +11:00
Cargo.toml Add p2wpkh address creation example 2024-11-27 15:09:14 -06:00