rust-bitcoin-unsafe-fast/primitives/src
merge-script 1b04f5df65
Merge rust-bitcoin/rust-bitcoin#4431: units: rename relative locktime types, absolute::Time, and constructors
826acb8273 units: rename relative::HeightInterval constructors (Andrew Poelstra)
39b4f7670d units: rename relative::Height to HeightInterval (Andrew Poelstra)
d3619cc1bc units: deprecate relative::MtpInterval::to_consensus_u32 (Andrew Poelstra)
1a6b8b4c7a units: rename relative::Time to MtpInterval (Andrew Poelstra)
39b057fade units: rename absolute::Height consensus functions (Andrew Poelstra)
5a8f33f380 units: rename absolute::Mtp consensus functions (Andrew Poelstra)
8ffcd2cf30 units: rename absolute::Time to absolute::Mtp (Andrew Poelstra)

Pull request description:

  This PR does a whole bunch of renames to the `units` locktime modules. These modules contain the underlying units for locktime types and hopefully aren't used directly too often, which should minimize the disruption from these renames.

  This fixes a number of issues:

  * Confusion between blocktimes and MTPs (which in fairness, *are* blocktimes, but they're not the one that users are likely to reach for)
  * Constructor and conversion names that imply there is a "consensus encoding" for these bare units, which corresponded to the consensus encoding of the corresponding locktimes/sequence numbers
  * `from_*` methods without `to_*` methods and vice-versa (overlaps with the above)
  * the horribly named `value` method on relative heights and times (but not absolute ones)

  This PR does **not** remove the `MtpAndHeight` type, nor does it add constructors for `Mtp` from lists of blocktimes. This is because the PR was too big already and I felt I should split it up.

  Alternate to #4427

ACKs for top commit:
  tcharding:
    ACK 826acb8273

Tree-SHA512: 6e0491e17927625cde85c2cf92ff152a10613e632474122a626ee31b662d21c09fcb9fa3014c44708c97536535a33845cbbcd81e73dcdf98e9ee9fd6143c698f
2025-05-05 09:08:30 +10:00
..
locktime Merge rust-bitcoin/rust-bitcoin#4431: units: rename relative locktime types, absolute::Time, and constructors 2025-05-05 09:08:30 +10:00
script Make Lower/Upper hex print scripts with len prefix 2025-04-28 13:43:07 +10:00
block.rs 2025-04-27 automated rustfmt nightly 2025-04-27 01:36:56 +00:00
lib.rs Merge rust-bitcoin/rust-bitcoin#4219: Rename then new `Timestamp` type 2025-03-13 15:13:31 +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 primitives: Enable pedantic lints 2025-03-06 10:58:17 +11:00
sequence.rs units: rename relative::HeightInterval constructors 2025-05-03 03:12:08 +00:00
taproot.rs Move taproot back to bitcoin crate 2025-02-26 15:45:49 +11:00
transaction.rs Add regression tests for Display impl 2025-04-30 16:14:05 +01:00
witness.rs 2025-04-27 automated rustfmt nightly 2025-04-27 01:36:56 +00:00