Merge rust-bitcoin/rust-bitcoin#3371: Add doc comment detailing fee calculation

8c29fe08f8 Revise doc comment (yancy)

Pull request description:

  Update doc comment to make clear that the ceiling is computed instead of the default behavior for integer division.

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

Tree-SHA512: 3793dccab5b5a3e59b3949ecb54475c76263e1debcc18df42f3b0251189435ba87e537c4b5d80c91f4b916449618a75e6efac32b4ba2fc29c42563e1b0fb4a89
This commit is contained in:
merge-script 2024-09-18 16:58:00 +00:00
commit 9e90f7dfd8
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 3 additions and 0 deletions

View File

@ -86,6 +86,9 @@ impl FeeRate {
/// Checked weight multiplication.
///
/// Computes the absolute fee amount for a given [`Weight`] at this fee rate.
/// When the resulting fee is a non-integer amount, the amount is rounded up,
/// ensuring that the transaction fee is enough instead of falling short if
/// rounded down.
///
/// [`None`] is returned if an overflow occurred.
pub fn checked_mul_by_weight(self, rhs: Weight) -> Option<Amount> {