rust-bitcoin-unsafe-fast/units
merge-script 27f6f17974
Merge rust-bitcoin/rust-bitcoin#3430: Add checked div by weight to amount
a0c58a4a8b Add checked weight division to Amount (yancy)
8def40a991 Add assertions to checked_weight_mul test (yancy)
16ce70d3a6 Add div_by_weight test to fee_rate (yancy)

Pull request description:

  Adds the checked variant of `amount / weight`.  I also added a test to the non-checked version for comparison so the reviewer knows they compute the same way (integer division rounded down).

  Also added assertion to `checked_weight_mul test` showing the results are rounded up.

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

Tree-SHA512: cf14123ed261d100e3261a720c26f8c10368f05225e32eaa246f25ab766d20515db5feb98335d4e3e08a8146a70db65ff64670da3f75e7764e8f86ef534d2663
2024-10-10 18:19:16 +00:00
..
contrib Add Arbitrary dependency 2024-08-23 15:39:20 -05:00
src Merge rust-bitcoin/rust-bitcoin#3430: Add checked div by weight to amount 2024-10-10 18:19:16 +00:00
CHANGELOG.md Bump version of bitcoin-units to 0.2.0 2024-09-25 10:58:31 +10:00
Cargo.toml Bump version of bitcoin-units to 0.2.0 2024-09-25 10:58:31 +10:00
README.md Bump MSRV to 1.63 2024-07-27 07:24:32 +02:00

README.md

Bitcoin Units

This crate provides basic Bitcoin numeric units such as Amount.

Minimum Supported Rust Version (MSRV)

This library should always compile with any combination of features on Rust 1.63.0.

Licensing

The code in this project is licensed under the Creative Commons CC0 1.0 Universal license. We use the SPDX license list and SPDX IDs.