rust-bitcoin-unsafe-fast/bitcoin/tests
Tobin C. Harding 4621d2bde1
Modify locktime serde implemenations
The `units::locktime` types are used for two things:

- They are the inner types of `primitives` `LockTime`s
- They are used ephemerally for checking satisfaction

Neither of these use cases requires `serde` impls for the `units` types.
Since we are trying to release 1.0 with minimal amounts of code we
should remove them.

For `LockTime`s that need to be stored on disk or go over the wire we
can manually implement the `serde` traits. For `absolute::LockTime` this
is done already and there is no reason the `relative::LockTime` impl
cannot be the same [0]. This differs from the current `serde` trait impls
but we have already decided that in 0.33 we are going to accept breakage
and direct users to use 0.32 to handle it.

- Remove `serde` stuff from `units::locktime`
- Manually implement `serde` traits on `relative::LockTime`
- Fix the regression test to use the new format

While we are at it use a uniform terse call in `serialize`.

[0] This is because there is an unambiguous encoding for the whole set
of locktimes - consensus encoding.
2025-06-01 14:07:33 +01:00
..
data Modify locktime serde implemenations 2025-06-01 14:07:33 +01:00
bip_174.rs Merge rust-bitcoin/rust-bitcoin#4387: bip32: overhaul error types and add a "maximum depth exceeded" error 2025-04-30 13:12:01 +00:00
psbt-sign-taproot.rs Accept flexible input types for Taproot-related functions 2025-05-06 09:01:27 -03:00
serde.rs bitcoin: Make test code spacing uniform 2025-06-01 14:07:28 +01:00
serde_opcodes.rs Remove usage of blockdata from paths 2024-06-20 12:00:22 +10:00