Yeah, needs another variable:
diff --git a/src/bench/wallet_create_tx.cpp b/src/bench/wallet_create_tx.cpp
--- a/src/bench/wallet_create_tx.cpp (revision d53400e75e2a4573229dba7f1a0da88eb936811c)
+++ b/src/bench/wallet_create_tx.cpp (date 1698266114002)
@@ -94,13 +94,14 @@
}
// Generate destinations
- CScript dest = GetScriptForDestination(getNewDestination(wallet, output_type));
+ CTxDestination dest{getNewDestination(wallet, output_type)};
+ CScript out_script{GetScriptForDestination(dest)};
// Generate chain; each coinbase will have two outputs to fill-up the wallet
const auto& params = Params();
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, out_script);
}
// Check available balance