Skip to content

Commit 58f8b15

Browse files
committed
Merge bitcoin/bitcoin#22008: wallet: Cleanup and refactor CreateTransactionInternal
96c2c95 scripted-diff: Rename SelectCoinsMinConf to AttemptSelection (Andrew Chow) b583f73 Move vin filling to before final fee setting (Andrew Chow) d39cac0 Set m_subtract_fee_outputs during recipients vector loop (Andrew Chow) 364e069 Move variable initializations to where they are used (Andrew Chow) 32ab430 Move recipients vector checks to beginning of CreateTransaction (Andrew Chow) cd1d6d3 Rename nSubtractFeeFromAmount in CreateTransaction (Andrew Chow) dac21c7 Rename nValue and nValueToSelect (Andrew Chow) d2aee3b Remove extraneous scope in CreateTransactionInternal (Andrew Chow) b299596 Move cs_wallet lock in CreateTransactionInternal to top of function (Andrew Chow) Pull request description: #17331 did some refactors and cleanup of `CreateTransactionInternal` to make it easier to understand, however it is still a bit convoluted even though it doesn't have to be. This PR does additional cleanup and refactoring to `CreateTransactionInternal` so that it is easier to understand. Some unnecessary code was removed, some variables moved around to where they matter, and several indents removed. ACKs for top commit: glozow: reACK 96c2c95 ryanofsky: Code review ACK 96c2c95 also acked previously (was reverted). meshcollider: re-utACK 96c2c95 Tree-SHA512: 3dba67ed436968a07bfd82d435d566ad74e116c6e50ac9baed7144a46ad5c0f630b1ba59d91e8e8972ac2af559d7c0576f0560f09684d2ab20fad6689902866f
2 parents fe51145 + 96c2c95 commit 58f8b15

File tree

4 files changed

+282
-291
lines changed

4 files changed

+282
-291
lines changed

src/bench/coin_selection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static void CoinSelection(benchmark::Bench& bench)
5656
bench.run([&] {
5757
std::set<CInputCoin> setCoinsRet;
5858
CAmount nValueRet;
59-
bool success = wallet.SelectCoinsMinConf(1003 * COIN, filter_standard, coins, setCoinsRet, nValueRet, coin_selection_params);
59+
bool success = wallet.AttemptSelection(1003 * COIN, filter_standard, coins, setCoinsRet, nValueRet, coin_selection_params);
6060
assert(success);
6161
assert(nValueRet == 1003 * COIN);
6262
assert(setCoinsRet.size() == 2);

0 commit comments

Comments
 (0)