rust-bitcoin-unsafe-fast/bitcoin/tests
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
..
data Use MAX_MONEY in serde regression test 2025-01-24 12:15:13 +11:00
bip_174.rs Improve naming of methods on Xpub and Xpriv 2024-09-29 11:07:32 +08:00
psbt-sign-taproot.rs Enforce the MAX_MONEY invariant in amount types 2025-03-13 09:07:14 +11:00
serde.rs Pick one - MAX or MAX_MONEY 2025-03-11 05:37:39 +11:00
serde_opcodes.rs Remove usage of blockdata from paths 2024-06-20 12:00:22 +10:00