mirror of https://github.com/bitcoin/bitcoin
fuzz: don't allow adding duplicate transactions to the mempool
This commit is contained in:
parent
5539bcb45f
commit
c49e0444e5
|
@ -72,7 +72,7 @@ FUZZ_TARGET(partially_downloaded_block, .init = initialize_pdb)
|
||||||
available.insert(i);
|
available.insert(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (add_to_mempool) {
|
if (add_to_mempool && !pool.exists(GenTxid::Txid(tx->GetHash()))) {
|
||||||
LOCK2(cs_main, pool.cs);
|
LOCK2(cs_main, pool.cs);
|
||||||
pool.addUnchecked(ConsumeTxMemPoolEntry(fuzzed_data_provider, *tx));
|
pool.addUnchecked(ConsumeTxMemPoolEntry(fuzzed_data_provider, *tx));
|
||||||
available.insert(i);
|
available.insert(i);
|
||||||
|
|
Loading…
Reference in New Issue