Skip to content

Commit 5d294bc

Browse files
committed
Merge bitcoin/bitcoin#25825: wallet: consolidate CoinSelectionParams::m_change_target and m_min_change_target
acda7e8 [coin selection] consolidate m_change_target and m_min_change_target (glozow) Pull request description: These values are both intended for the same thing. Their divergence seems to be the result of an incomplete rename. ACKs for top commit: achow101: ACK acda7e8 Xekyo: ACK acda7e8 furszy: ACK acda7e8 aureleoules: ACK acda7e8. Tree-SHA512: 4b86171af5d893f7172373bb404bad12c49588ad1e22eb0544c242173f4bc4dede2ff1270c93c9f02f503ab8d9f66b841a8319d0ecb5e896d0fe8727cf03dbf4
2 parents e5d8b65 + acda7e8 commit 5d294bc

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)