0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00

[p2p] don't process orphan if in recent rejects

This should never happen normally, but just in case.
This commit is contained in:
glozow 2024-08-23 16:05:19 +01:00
parent 2266eba43a
commit 5269d57e6d

View file

@ -313,7 +313,7 @@ node::RejectedTxTodo TxDownloadManagerImpl::MempoolRejectedTx(const CTransaction
if (state.GetResult() == TxValidationResult::TX_MISSING_INPUTS) { if (state.GetResult() == TxValidationResult::TX_MISSING_INPUTS) {
// Only process a new orphan if this is a first time failure, as otherwise it must be either // Only process a new orphan if this is a first time failure, as otherwise it must be either
// already in orphanage or from 1p1c processing. // already in orphanage or from 1p1c processing.
if (first_time_failure) { if (first_time_failure && !RecentRejectsFilter().contains(ptx->GetWitnessHash().ToUint256())) {
bool fRejectedParents = false; // It may be the case that the orphans parents have all been rejected bool fRejectedParents = false; // It may be the case that the orphans parents have all been rejected
// Deduplicate parent txids, so that we don't have to loop over // Deduplicate parent txids, so that we don't have to loop over