Skip to content

Commit acda7e8

Browse files
committed
[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.
1 parent dd62721 commit acda7e8

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/wallet/coinselection.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ struct CoinSelectionParams {
125125
CAmount m_min_change_target{0};
126126
/** Cost of creating the change output. */
127127
CAmount m_change_fee{0};
128-
/** The pre-determined minimum value to target when funding a change output. */
129-
CAmount m_change_target{0};
130128
/** Cost of creating the change output + cost of spending the change output in the future. */
131129
CAmount m_cost_of_change{0};
132130
/** The targeted feerate of the transaction being built. */

src/wallet/spend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal(
794794
coin_selection_params.m_subtract_fee_outputs = true;
795795
}
796796
}
797-
coin_selection_params.m_change_target = GenerateChangeTarget(std::floor(recipients_sum / vecSend.size()), rng_fast);
797+
coin_selection_params.m_min_change_target = GenerateChangeTarget(std::floor(recipients_sum / vecSend.size()), rng_fast);
798798

799799
// Create change script that will be used if we need change
800800
CScript scriptChange;

0 commit comments

Comments
 (0)