Skip to content

Commit

Permalink
fix: add notes about the new max_weight_to_satisfy
Browse files Browse the repository at this point in the history
  • Loading branch information
realeinherjar committed Sep 20, 2023
1 parent 7b35e20 commit 0884213
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/bdk/src/wallet/tx_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,12 @@ impl<'a, D, Cs: CoinSelectionAlgorithm, Ctx: TxBuilderContext> TxBuilder<'a, D,
/// causing you to pay a fee that is too high. The party who is broadcasting the transaction can
/// of course check the real input weight matches the expected weight prior to broadcasting.
///
/// TODO: add notes about the new `max_weight_to_satisfy`
/// To guarantee the `max_weight_to_satisfy` is correct, you can require the party providing the
/// `psbt_input` provide a miniscript descriptor for the input so you can check it against the
/// `script_pubkey` and then ask it for the [`max_weight_to_satisfy`].
/// Be aware that `max_weight_to_satisfy` uses `segwit_weight` instead of `legacy_weight`,
/// if you want to include only legacy inputs in your transaction, you should remove 1WU
/// from each input's `max_weight_to_satisfy` for a more accurate estimate.
///
/// This is an **EXPERIMENTAL** feature, API and other major changes are expected.
///
Expand Down

0 comments on commit 0884213

Please sign in to comment.