Skip to content

Commit

Permalink
[doc]: update reason for deducting change output weight
Browse files Browse the repository at this point in the history
`CoinGrinder` will also produce change output, listing all the
Coin selection algorithms that produces change output is not maintainable,
just infer that remaining algorithms all might produce change.
  • Loading branch information
ismaelsadeeq committed Jun 27, 2024
1 parent 7f61d31 commit baab0d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wallet/spend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ util::Result<SelectionResult> ChooseSelectionResult(interfaces::Chain& chain, co
} else append_error(std::move(bnb_result));
}

// As Knapsack and SRD can create change, also deduce change weight.
// Deduct change weight because remaining Coin Selection algorithms can create change output
max_selection_weight -= (coin_selection_params.change_output_size * WITNESS_SCALE_FACTOR);

// The knapsack solver has some legacy behavior where it will spend dust outputs. We retain this behavior, so don't filter for positive only here.
Expand Down

0 comments on commit baab0d2

Please sign in to comment.