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: ACK8c29fe08f8
apoelstra: ACK8c29fe08f8
successfully ran local tests Tree-SHA512: 3793dccab5b5a3e59b3949ecb54475c76263e1debcc18df42f3b0251189435ba87e537c4b5d80c91f4b916449618a75e6efac32b4ba2fc29c42563e1b0fb4a89
This commit is contained in:
commit
9e90f7dfd8
|
@ -86,6 +86,9 @@ impl FeeRate {
|
||||||
/// Checked weight multiplication.
|
/// Checked weight multiplication.
|
||||||
///
|
///
|
||||||
/// Computes the absolute fee amount for a given [`Weight`] at this fee rate.
|
/// 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.
|
/// [`None`] is returned if an overflow occurred.
|
||||||
pub fn checked_mul_by_weight(self, rhs: Weight) -> Option<Amount> {
|
pub fn checked_mul_by_weight(self, rhs: Weight) -> Option<Amount> {
|
||||||
|
|
Loading…
Reference in New Issue