Skip to content

Commit

Permalink
fuzz: don't allow adding duplicate transactions to the mempool
Browse files Browse the repository at this point in the history
  • Loading branch information
sdaftuar committed Apr 28, 2024
1 parent 5539bcb commit c49e044
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/fuzz/partially_downloaded_block.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit c49e044

Please sign in to comment.