From 2e3e63068e7ed9b30acb5ac3172227881201d507 Mon Sep 17 00:00:00 2001 From: Daniela Brozzoni Date: Mon, 9 Oct 2023 12:22:42 +0200 Subject: [PATCH] doc(bdk): Clarify the absolute_fee docs Fixes #1066 --- crates/bdk/src/wallet/tx_builder.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/bdk/src/wallet/tx_builder.rs b/crates/bdk/src/wallet/tx_builder.rs index 37e85a1240..5fb2667e5c 100644 --- a/crates/bdk/src/wallet/tx_builder.rs +++ b/crates/bdk/src/wallet/tx_builder.rs @@ -198,6 +198,10 @@ impl<'a, D, Cs: CoinSelectionAlgorithm, Ctx: TxBuilderContext> TxBuilder<'a, D, /// If anyone sets both the fee_absolute method and the fee_rate method, /// the FeePolicy enum will be set by whichever method was called last, /// as the FeeRate and FeeAmount are mutually exclusive. + /// + /// Note that this is really a minimum absolute fee -- it's possible to + /// overshoot it slightly since adding a change output to drain the remaining + /// excess might not be viable. pub fn fee_absolute(&mut self, fee_amount: u64) -> &mut Self { self.params.fee_policy = Some(FeePolicy::FeeAmount(fee_amount)); self