@@ -232,7 +232,7 @@ FUZZ_TARGET(ephemeral_package_eval, .init = initialize_tx_pool)
232
232
bool last_tx = num_txs > 1 && txs.size () == num_txs - 1 ;
233
233
234
234
// Create transaction to add to the mempool
235
- const CTransactionRef tx = [&] {
235
+ txs. emplace_back ( [&] {
236
236
CMutableTransaction tx_mut;
237
237
tx_mut.version = CTransaction::CURRENT_VERSION;
238
238
tx_mut.nLockTime = 0 ;
@@ -299,8 +299,7 @@ FUZZ_TARGET(ephemeral_package_eval, .init = initialize_tx_pool)
299
299
outpoints_value[COutPoint (tx->GetHash (), i)] = tx->vout [i].nValue ;
300
300
}
301
301
return tx;
302
- }();
303
- txs.push_back (tx);
302
+ }());
304
303
}
305
304
306
305
if (fuzzed_data_provider.ConsumeBool ()) {
@@ -392,7 +391,7 @@ FUZZ_TARGET(tx_package_eval, .init = initialize_tx_pool)
392
391
bool last_tx = num_txs > 1 && txs.size () == num_txs - 1 ;
393
392
394
393
// Create transaction to add to the mempool
395
- const CTransactionRef tx = [&] {
394
+ txs. emplace_back ( [&] {
396
395
CMutableTransaction tx_mut;
397
396
tx_mut.version = fuzzed_data_provider.ConsumeBool () ? TRUC_VERSION : CTransaction::CURRENT_VERSION;
398
397
tx_mut.nLockTime = fuzzed_data_provider.ConsumeBool () ? 0 : fuzzed_data_provider.ConsumeIntegral <uint32_t >();
@@ -470,8 +469,7 @@ FUZZ_TARGET(tx_package_eval, .init = initialize_tx_pool)
470
469
outpoints_value[COutPoint (tx->GetHash (), i)] = tx->vout [i].nValue ;
471
470
}
472
471
return tx;
473
- }();
474
- txs.push_back (tx);
472
+ }());
475
473
}
476
474
477
475
if (fuzzed_data_provider.ConsumeBool ()) {
0 commit comments