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

rust-bitcoin / rust-bitcoin / 12910323265
83%

Build:
DEFAULT BRANCH: master
Ran 22 Jan 2025 02:27PM UTC
Jobs 1
Files 117
Run time 4min
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

22 Jan 2025 02:26PM UTC coverage: 83.111% (+0.04%) from 83.072%
12910323265

push

github

apoelstra
Merge rust-bitcoin/rust-bitcoin#3893: feat: add Amount division by FeeRate

<a class=hub.com/rust-bitcoin/rust-bitcoin/commit/<a class="double-link" href="https://git"><a class=hub.com/rust-bitcoin/rust-bitcoin/commit/7482fcd934c09e3cd6cd25fd4328960b02f8e976">7482fcd93<a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/11f50127580e2555e1ff6f8fd33d242a3bf17cd0"> Run just check-api (jrakibi)
<a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/bcc38c40e08faa74e47814c148c75505facbff37">bcc38c40e</a> Add Amount division by FeeRate (jrakibi)

Pull request description:

  Add checked_div_by_fee_rate method to Amount that computes the maximum weight for a transaction with a given fee rate. This complements the existing `fee = fee_rate * weight `and `fee_rate = fee / weight` operations

  - Add `checked_div_by_fee_rate` method that returns Option<Weight>
  - Implement` Div<FeeRate>` for Amount for operator syntax support
  - Use `floor` division to ensure weight doesn't exceed intended fee

  This allows calculating the maximum transaction weight possible for a given fee amount and fee rate.

  Closes #3814

ACKs for top commit:
  apoelstra:
    ACK 7482fcd934c09e3cd6cd25fd4328960b02f8e976; successfully ran local tests
  tcharding:
    ACK 7482fcd934c09e3cd6cd25fd4328960b02f8e976

Tree-SHA512: 622ca42bd84f594603fb8623c80859daa7e

68 of 70 new or added lines in 2 files covered. (97.14%)

20914 of 25164 relevant lines covered (83.11%)

17309.42 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
94.4
0.35% units/src/fee.rs
Jobs
ID Job ID Ran Files Coverage
1 12910323265.1 22 Jan 2025 02:27PM UTC 117
83.11
GitHub Action Run
Source Files on build 12910323265
  • Tree
  • List 117
  • Changed 17
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #12910323265
  • 11f50127 on github
  • Prev Build on master (#12895471895)
  • Next Build on master (#12917316289)
  • 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