• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rust-bitcoin / rust-bitcoin / 14826077838
83%

Build:
DEFAULT BRANCH: master
Ran 04 May 2025 11:09PM UTC
Jobs 1
Files 131
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 May 2025 11:08PM UTC coverage: 84.273% (-0.01%) from 84.283%
14826077838

push

github

tcharding
Merge rust-bitcoin/rust-bitcoin#4431: units: rename relative locktime types, absolute::Time, and constructors

826acb827 units: rename relative::HeightInterval constructors (Andrew Poelstra)
39b4f7670 units: rename relative::Height to HeightInterval (Andrew Poelstra)
d3619cc1b units: deprecate relative::MtpInterval::to_consensus_u32 (Andrew Poelstra)
1a6b8b4c7 units: rename relative::Time to MtpInterval (Andrew Poelstra)
39b057fad units: rename absolute::Height consensus functions (Andrew Poelstra)
5a8f33f38 units: rename absolute::Mtp consensus functions (Andrew Poelstra)
8ffcd2cf3 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 826acb827326875f407ba0b7159894f0d8f90d2... (continued)

135 of 174 new or added lines in 7 files covered. (77.59%)

3 existing lines in 3 files now uncovered.

22983 of 27272 relevant lines covered (84.27%)

16321.11 hits per line

Uncovered Changes

Lines Coverage ∆ File
17
60.65
-1.5% units/src/locktime/absolute.rs
10
81.25
-4.0% primitives/src/sequence.rs
6
86.23
-0.44% units/src/locktime/relative.rs
3
72.04
0.3% units/src/block.rs
2
99.26
0.03% primitives/src/locktime/relative.rs
1
93.91
0.0% bitcoin/src/blockdata/transaction.rs

Coverage Regressions

Lines Coverage ∆ File
1
86.38
0.31% bitcoin/src/psbt/mod.rs
1
81.25
-4.0% primitives/src/sequence.rs
1
86.23
-0.44% units/src/locktime/relative.rs
Jobs
ID Job ID Ran Files Coverage
1 14826077838.1 04 May 2025 11:09PM UTC 131
84.27
GitHub Action Run
Source Files on build 14826077838
  • Tree
  • List 131
  • Changed 10
  • Source Changed 9
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #14826077838
  • 1b04f5df on github
  • Prev Build on master (#14815517035)
  • Next Build on master (#14836918710)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc