rust-bitcoin-unsafe-fast/bitcoin
Tobin C. Harding ab4ea7c13d
Enforce the MAX_MONEY invariant in amount types
Enforcing the MAX_MONEY invariant is quite involved because it means
multiple things:

- Constructing amounts is now fallible
- Converting from unsigned to signed is now infallible
- Taking the absolute value is now infallible
- Integer overflow is illuminated in various places

Details:

- Update from_sat to check the invariant
- Fix all docs including examples
- Use the unchecked constructor in test code
- Comment any other use of the unchecked constructor
- Deprecate unchecked_abs
- Fail serde (using the horrible string error variant)
- Try not to use the unchecked constructor in rustdocs, no need to encourage unsuspecting users to use it.
- Use ? in rustdoc examples (required by Rust API guidlines)
- Remove TryFrom<Amount> for SignedAmount because the conversion is now infallible. Add a From impl.
- Fix the arbitrary impls
- Maintain correct formatting
- Remove private check_max function as its no longer needed
2025-03-13 09:07:14 +11:00
..
contrib Remove rust-ordered dependency 2025-02-18 13:36:07 +11:00
embedded Move opcodes to primitives 2024-07-09 15:26:33 +10:00
examples Merge rust-bitcoin/rust-bitcoin#4186: Clean up Witness API 2025-03-06 18:43:27 +00:00
src Enforce the MAX_MONEY invariant in amount types 2025-03-13 09:07:14 +11:00
tests Enforce the MAX_MONEY invariant in amount types 2025-03-13 09:07:14 +11:00
CHANGELOG.md Grab missing changelog 2025-02-25 19:35:43 +11:00
Cargo.toml Remove references to cfg(mutate) from lint allow - no longer allowed 2025-03-10 12:45:57 +08:00