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 |
||
---|---|---|
.. | ||
data | ||
bip_174.rs | ||
psbt-sign-taproot.rs | ||
serde.rs | ||
serde_opcodes.rs |