mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-29 18:05:58 +02:00
bugfix: Mark CNoDestination and PubKeyDestination constructor explicit
This should fix the bug reported in
https://github.com/bitcoin/bitcoin/pull/28246#discussion_r1371640502,
which caused the GUI to not detect the destination type of recipients,
thus picking the wrong change destination type.
Also, add missing lifetimebound attribute to a getter method.
GitHub-Pull: #28728
Rebased-From: 1111475b41
This commit is contained in:
@@ -94,13 +94,14 @@ static void WalletCreateTx(benchmark::Bench& bench, const OutputType output_type
|
||||
}
|
||||
|
||||
// Generate destinations
|
||||
CScript dest = GetScriptForDestination(getNewDestination(wallet, output_type));
|
||||
const auto dest{getNewDestination(wallet, output_type)};
|
||||
|
||||
// Generate chain; each coinbase will have two outputs to fill-up the wallet
|
||||
const auto& params = Params();
|
||||
const CScript coinbase_out{GetScriptForDestination(dest)};
|
||||
unsigned int chain_size = 5000; // 5k blocks means 10k UTXO for the wallet (minus 200 due COINBASE_MATURITY)
|
||||
for (unsigned int i = 0; i < chain_size; ++i) {
|
||||
generateFakeBlock(params, test_setup->m_node, wallet, dest);
|
||||
generateFakeBlock(params, test_setup->m_node, wallet, coinbase_out);
|
||||
}
|
||||
|
||||
// Check available balance
|
||||
@@ -185,4 +186,4 @@ static void WalletAvailableCoins(benchmark::Bench& bench) { AvailableCoins(bench
|
||||
|
||||
BENCHMARK(WalletCreateTxUseOnlyPresetInputs, benchmark::PriorityLevel::LOW)
|
||||
BENCHMARK(WalletCreateTxUsePresetInputsAndCoinSelection, benchmark::PriorityLevel::LOW)
|
||||
BENCHMARK(WalletAvailableCoins, benchmark::PriorityLevel::LOW);
|
||||
BENCHMARK(WalletAvailableCoins, benchmark::PriorityLevel::LOW);
|
||||
|
||||
Reference in New Issue
Block a user