mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-03 09:43:55 +02:00
Merge bitcoin/bitcoin#25730: RPC: listunspent, add "include immature coinbase" flag
fa84df1f03scripted-diff: wallet: rename AvailableCoinsParams members to snake_case (furszy)61c2265629wallet: group AvailableCoins filtering parameters in a single struct (furszy)f0f6a3577bRPC: 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: reACKfa84df1f03achow101: ACKfa84df1f03aureleoules: reACKfa84df1f03kouloumos: reACKfa84df1f03theStack: Code-review ACKfa84df1f03Tree-SHA512: 0f3544cb8cfd0378a5c74594480f78e9e919c6cfb73a83e0f3112f8a0132a9147cf846f999eab522cea9ef5bd3ffd60690ea2ca367dde457b0554d7f38aec792
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user