aboutsummaryrefslogtreecommitdiff
path: root/src/bench
diff options
context:
space:
mode:
authorAndrew Chow <github@achow101.com>2022-11-15 19:40:25 -0500
committerAndrew Chow <github@achow101.com>2022-11-15 19:53:04 -0500
commitf0c646f026e652082e798800136dc06c734fdab6 (patch)
treef6018207a3b233a1c54b4cf944e91c21ede4f6cf /src/bench
parent5602cc7ccf4a51ad52dadc495b732f54b43ceb99 (diff)
parentfa84df1f033a5d1a8342ea941eca0b5ef73d78e7 (diff)
Merge bitcoin/bitcoin#25730: RPC: listunspent, add "include immature coinbase" flag
fa84df1f033a5d1a8342ea941eca0b5ef73d78e7 scripted-diff: wallet: rename AvailableCoinsParams members to snake_case (furszy) 61c2265629fdf11a2cc266fad54ceb0a1247bb5e wallet: group AvailableCoins filtering parameters in a single struct (furszy) f0f6a3577bef2e9ebd084fe35850e4e9580128a9 RPC: listunspent, add "include immature coinbase" flag (furszy) Pull request description: Simple PR; adds a "include_immature_coinbase" flag to `listunspent` to include the immature coinbase UTXOs on the response. Requested by #25728. ACKs for top commit: danielabrozzoni: reACK fa84df1f033a5d1a8342ea941eca0b5ef73d78e7 achow101: ACK fa84df1f033a5d1a8342ea941eca0b5ef73d78e7 aureleoules: reACK fa84df1f033a5d1a8342ea941eca0b5ef73d78e7 kouloumos: reACK fa84df1f033a5d1a8342ea941eca0b5ef73d78e7 theStack: Code-review ACK fa84df1f033a5d1a8342ea941eca0b5ef73d78e7 Tree-SHA512: 0f3544cb8cfd0378a5c74594480f78e9e919c6cfb73a83e0f3112f8a0132a9147cf846f999eab522cea9ef5bd3ffd60690ea2ca367dde457b0554d7f38aec792
Diffstat (limited to 'src/bench')
-rw-r--r--src/bench/wallet_create_tx.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bench/wallet_create_tx.cpp b/src/bench/wallet_create_tx.cpp
index 207b22c584..8f5c50872b 100644
--- a/src/bench/wallet_create_tx.cpp
+++ b/src/bench/wallet_create_tx.cpp
@@ -111,9 +111,10 @@ static void WalletCreateTx(benchmark::Bench& bench, const OutputType output_type
CAmount target = 0;
if (preset_inputs) {
// Select inputs, each has 49 BTC
+ wallet::CoinFilterParams filter_coins;
+ filter_coins.max_count = preset_inputs->num_of_internal_inputs;
const auto& res = WITH_LOCK(wallet.cs_wallet,
- return wallet::AvailableCoins(wallet, nullptr, std::nullopt, 1, MAX_MONEY,
- MAX_MONEY, preset_inputs->num_of_internal_inputs));
+ return wallet::AvailableCoins(wallet, /*coinControl=*/nullptr, /*feerate=*/std::nullopt, filter_coins));
for (int i=0; i < preset_inputs->num_of_internal_inputs; i++) {
const auto& coin{res.coins.at(output_type)[i]};
target += coin.txout.nValue;