Skip to content

Commit 0884213

Browse files
committed
fix: add notes about the new max_weight_to_satisfy
1 parent 7b35e20 commit 0884213

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/bdk/src/wallet/tx_builder.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -336,10 +336,12 @@ impl<'a, D, Cs: CoinSelectionAlgorithm, Ctx: TxBuilderContext> TxBuilder<'a, D,
336336
/// causing you to pay a fee that is too high. The party who is broadcasting the transaction can
337337
/// of course check the real input weight matches the expected weight prior to broadcasting.
338338
///
339-
/// TODO: add notes about the new `max_weight_to_satisfy`
340339
/// To guarantee the `max_weight_to_satisfy` is correct, you can require the party providing the
341340
/// `psbt_input` provide a miniscript descriptor for the input so you can check it against the
342341
/// `script_pubkey` and then ask it for the [`max_weight_to_satisfy`].
342+
/// Be aware that `max_weight_to_satisfy` uses `segwit_weight` instead of `legacy_weight`,
343+
/// if you want to include only legacy inputs in your transaction, you should remove 1WU
344+
/// from each input's `max_weight_to_satisfy` for a more accurate estimate.
343345
///
344346
/// This is an **EXPERIMENTAL** feature, API and other major changes are expected.
345347
///

0 commit comments

Comments
 (0)