mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-06 14:19:59 -05:00
[coin selection] consolidate m_change_target and m_min_change_target
These values are both intended for the same thing. Their divergence seems to be the result of an incomplete rename.
This commit is contained in:
parent
dd62721ba9
commit
acda7e8686
2 changed files with 1 additions and 3 deletions
|
@ -125,8 +125,6 @@ struct CoinSelectionParams {
|
||||||
CAmount m_min_change_target{0};
|
CAmount m_min_change_target{0};
|
||||||
/** Cost of creating the change output. */
|
/** Cost of creating the change output. */
|
||||||
CAmount m_change_fee{0};
|
CAmount m_change_fee{0};
|
||||||
/** The pre-determined minimum value to target when funding a change output. */
|
|
||||||
CAmount m_change_target{0};
|
|
||||||
/** Cost of creating the change output + cost of spending the change output in the future. */
|
/** Cost of creating the change output + cost of spending the change output in the future. */
|
||||||
CAmount m_cost_of_change{0};
|
CAmount m_cost_of_change{0};
|
||||||
/** The targeted feerate of the transaction being built. */
|
/** The targeted feerate of the transaction being built. */
|
||||||
|
|
|
@ -794,7 +794,7 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal(
|
||||||
coin_selection_params.m_subtract_fee_outputs = true;
|
coin_selection_params.m_subtract_fee_outputs = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
coin_selection_params.m_change_target = GenerateChangeTarget(std::floor(recipients_sum / vecSend.size()), rng_fast);
|
coin_selection_params.m_min_change_target = GenerateChangeTarget(std::floor(recipients_sum / vecSend.size()), rng_fast);
|
||||||
|
|
||||||
// Create change script that will be used if we need change
|
// Create change script that will be used if we need change
|
||||||
CScript scriptChange;
|
CScript scriptChange;
|
||||||
|
|
Loading…
Add table
Reference in a new issue