bdk_wallet::coin_selection

Function decide_change

Source
pub fn decide_change(
    remaining_amount: Amount,
    fee_rate: FeeRate,
    drain_script: &Script,
) -> Excess
Expand description

Decide if change can be created

  • remaining_amount: the amount in which the selected coins exceed the target amount
  • fee_rate: required fee rate for the current selection
  • drain_script: script to consider change creation