rust-bitcoin-unsafe-fast/primitives/src
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
..
locktime Modify locktime serde implemenations 2025-06-01 14:07:33 +01:00
script Merge rust-bitcoin/rust-bitcoin#4485: Add `Builder::with_capacity()` 2025-05-13 17:16:54 +00:00
block.rs 2025-04-27 automated rustfmt nightly 2025-04-27 01:36:56 +00:00
lib.rs Merge rust-bitcoin/rust-bitcoin#4458: locktimes: replace `MtpAndHeight` type with pair of `BlockMtp` and `BlockHeight` 2025-05-07 22:32:16 +00:00
merkle_tree.rs primitives: Make hex optional 2025-04-11 10:55:34 +10:00
opcodes.rs 2025-03-16 automated rustfmt nightly 2025-03-16 01:25:25 +00:00
pow.rs Do not derive Default on CompactTarget 2025-05-27 08:09:56 +01:00
sequence.rs Run the formatter 2025-05-08 10:16:56 +10:00
taproot.rs Move taproot back to bitcoin crate 2025-02-26 15:45:49 +11:00
transaction.rs style: use Self:: instead of type aliases in error impls 2025-05-22 20:28:33 +03:00
witness.rs primitives: Derive Clone on witness::Iter 2025-05-09 08:59:31 +10:00