Skip to content

Commit cc15c5b

Browse files
committed
fuzz: don't allow adding duplicate transactions to the mempool
1 parent 2a07c46 commit cc15c5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/fuzz/partially_downloaded_block.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ FUZZ_TARGET(partially_downloaded_block, .init = initialize_pdb)
7272
available.insert(i);
7373
}
7474

75-
if (add_to_mempool) {
75+
if (add_to_mempool && !pool.exists(GenTxid::Txid(tx->GetHash()))) {
7676
LOCK2(cs_main, pool.cs);
7777
pool.addUnchecked(ConsumeTxMemPoolEntry(fuzzed_data_provider, *tx));
7878
available.insert(i);

0 commit comments

Comments
 (0)