mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
Merge bitcoin/bitcoin#22892: doc: Clarify that change_cost cannot be negative in GetSelectionWaste
d2eccacd18
doc: Clarify that change_cost cannot be negative in GetSelectionWaste (benthecarman) Pull request description: We assert that the `change_cost` must be positive so we should document it in the function's docs4f5ad43b1e/src/wallet/coinselection.cpp (L361)
ACKs for top commit: jonatack: ACKd2eccacd18
jarolrod: ACKd2eccacd18
shaavan: ACKd2eccacd18
Tree-SHA512: 089bc41d7e212b811455527ce2ac83301eae0edc03933dcbd5229b22078827395c8e3bcfda0ba029b7c60705db3119b4f80e372842a6bd8dae195dbaa0b52833
This commit is contained in:
commit
07e743edd0
1 changed files with 3 additions and 1 deletions
|
@ -174,7 +174,9 @@ struct OutputGroup
|
|||
* change_cost = effective_feerate * change_output_size + long_term_feerate * change_spend_size
|
||||
*
|
||||
* @param[in] inputs The selected inputs
|
||||
* @param[in] change_cost The cost of creating change and spending it in the future. Only used if there is change. Must be 0 if there is no change.
|
||||
* @param[in] change_cost The cost of creating change and spending it in the future.
|
||||
* Only used if there is change, in which case it must be positive.
|
||||
* Must be 0 if there is no change.
|
||||
* @param[in] target The amount targeted by the coin selection algorithm.
|
||||
* @param[in] use_effective_value Whether to use the input's effective value (when true) or the real value (when false).
|
||||
* @return The waste
|
||||
|
|
Loading…
Add table
Reference in a new issue