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

rust-bitcoin / rust-bitcoin / 11023696523
83%

Build:
DEFAULT BRANCH: master
Ran 24 Sep 2024 11:54PM UTC
Jobs 1
Files 99
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

24 Sep 2024 11:53PM UTC coverage: 82.866% (+0.06%) from 82.811%
11023696523

push

github

apoelstra
Merge rust-bitcoin/rust-bitcoin#3381: Add FeeRate addition and subtraction traits

<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/cb2146d5fac37ea7f68caa7cb92a0e44e1bb4c41">cb2146d5f<a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/b5f96f3369d69af24688c49841195787b30600c0"> Implement FeeRate checked_sub (yancy)
<a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/212a7519299cf25fae24c329b50cbb98297e4e6a">212a75192</a><a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/b5f96f3369d69af24688c49841195787b30600c0"> Implement FeeRate checked_add (yancy)
</a><a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/c967eabd43d3f1bf0b7cdd0c8828090397f1699d">c967eabd4</a><a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/b5f96f3369d69af24688c49841195787b30600c0"> Implement FeeRate SubAssign (yancy)
</a><a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/c3a8bfa98dd3ead933dbb718525575ad248c6d0b">c3a8bfa98</a><a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/b5f96f3369d69af24688c49841195787b30600c0"> Implement FeeRate AddAssign (yancy)
</a><a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/0e708700561c38f4c2b465917881801cb10eea46">0e7087005 Implement FeeRate subtraction (yancy)
86359fe36 Implement FeeRate addition (yancy)

Pull request description:

  I can't think of a reason to not support addition and subtraction with `fee_rate`.  If two fee rates are added, the resulting units `sat/wu` units are viable.

  Without this, I have to do some shenanigans like:

  ```rust
  let tmp = fee_rate.to_sat_per_kwu();
  fee_rate = FeeRate::from_sat_per_kwu(tmp - 1);
  ```

ACKs for top commit:
  apoelstra:
    ACK cb2146d5fac37ea7f68caa7cb92a0e44e1bb4c41 successfully ran local tests
  tcharding:
    ACK cb2146d5fac37ea7f68caa7cb92a0e44e1bb4c41

Tree-SHA512: 582c5e75e8986fac32468b322011070c619

74 of 74 new or added lines in 1 file covered. (100.0%)

19017 of 22949 relevant lines covered (82.87%)

18231.48 hits per line

Jobs
ID Job ID Ran Files Coverage
1 11023696523.1 24 Sep 2024 11:54PM UTC 0
82.87
GitHub Action Run
Source Files on build 11023696523
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #11023696523
  • b5f96f33 on github
  • Prev Build on master (#11020530551)
  • Next Build on master (#11034092035)
  • 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