fuzz: don't allow adding duplicate transactions to the mempool

This commit is contained in:
Suhas Daftuar 2024-04-28 15:35:45 -04:00
parent 5539bcb45f
commit c49e0444e5
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ FUZZ_TARGET(partially_downloaded_block, .init = initialize_pdb)
available.insert(i);
}
if (add_to_mempool) {
if (add_to_mempool && !pool.exists(GenTxid::Txid(tx->GetHash()))) {
LOCK2(cs_main, pool.cs);
pool.addUnchecked(ConsumeTxMemPoolEntry(fuzzed_data_provider, *tx));
available.insert(i);