@@ -581,12 +581,12 @@ class PeerManagerImpl final : public PeerManager
581
581
bool MaybeDiscourageAndDisconnect (CNode& pnode, Peer& peer);
582
582
583
583
/* * Handle a transaction whose result was not MempoolAcceptResult::ResultType::VALID.
584
- * @param[in] maybe_add_extra_compact_tx Whether this tx should be added to vExtraTxnForCompact.
584
+ * @param[in] first_time_failure Whether this tx should be added to vExtraTxnForCompact.
585
585
* Set to false if the tx has already been rejected before,
586
586
* e.g. is an orphan, to avoid adding duplicate entries.
587
587
* Updates m_txrequest, m_lazy_recent_rejects, m_lazy_recent_rejects_reconsiderable, m_orphanage, and vExtraTxnForCompact. */
588
588
void ProcessInvalidTx (NodeId nodeid, const CTransactionRef& tx, const TxValidationState& result,
589
- bool maybe_add_extra_compact_tx )
589
+ bool first_time_failure )
590
590
EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex, g_msgproc_mutex, m_tx_download_mutex);
591
591
592
592
/* * Handle a transaction whose result was MempoolAcceptResult::ResultType::VALID.
@@ -3052,7 +3052,7 @@ void PeerManagerImpl::ProcessHeadersMessage(CNode& pfrom, Peer& peer,
3052
3052
}
3053
3053
3054
3054
void PeerManagerImpl::ProcessInvalidTx (NodeId nodeid, const CTransactionRef& ptx, const TxValidationState& state,
3055
- bool maybe_add_extra_compact_tx )
3055
+ bool first_time_failure )
3056
3056
{
3057
3057
AssertLockNotHeld (m_peer_mutex);
3058
3058
AssertLockHeld (g_msgproc_mutex);
@@ -3106,7 +3106,7 @@ void PeerManagerImpl::ProcessInvalidTx(NodeId nodeid, const CTransactionRef& ptx
3106
3106
RecentRejectsFilter ().insert (ptx->GetHash ().ToUint256 ());
3107
3107
m_txrequest.ForgetTxHash (ptx->GetHash ());
3108
3108
}
3109
- if (maybe_add_extra_compact_tx && RecursiveDynamicUsage (*ptx) < 100000 ) {
3109
+ if (first_time_failure && RecursiveDynamicUsage (*ptx) < 100000 ) {
3110
3110
AddToCompactExtraTransactions (ptx);
3111
3111
}
3112
3112
}
@@ -3191,7 +3191,7 @@ void PeerManagerImpl::ProcessPackageResult(const PackageToValidate& package_to_v
3191
3191
// added there when added to the orphanage or rejected for TX_RECONSIDERABLE.
3192
3192
// This should be updated if package submission is ever used for transactions
3193
3193
// that haven't already been validated before.
3194
- ProcessInvalidTx (nodeid, tx, tx_result.m_state , /* maybe_add_extra_compact_tx =*/ false );
3194
+ ProcessInvalidTx (nodeid, tx, tx_result.m_state , /* first_time_failure =*/ false );
3195
3195
break ;
3196
3196
}
3197
3197
case MempoolAcceptResult::ResultType::MEMPOOL_ENTRY:
@@ -3290,7 +3290,7 @@ bool PeerManagerImpl::ProcessOrphanTx(Peer& peer)
3290
3290
state.GetResult () != TxValidationResult::TX_UNKNOWN &&
3291
3291
state.GetResult () != TxValidationResult::TX_NO_MEMPOOL &&
3292
3292
state.GetResult () != TxValidationResult::TX_RESULT_UNSET)) {
3293
- ProcessInvalidTx (peer.m_id , porphanTx, state, /* maybe_add_extra_compact_tx =*/ false );
3293
+ ProcessInvalidTx (peer.m_id , porphanTx, state, /* first_time_failure =*/ false );
3294
3294
}
3295
3295
return true ;
3296
3296
}
@@ -4574,7 +4574,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
4574
4574
}
4575
4575
}
4576
4576
if (state.IsInvalid ()) {
4577
- ProcessInvalidTx (pfrom.GetId (), ptx, state, /* maybe_add_extra_compact_tx =*/ true );
4577
+ ProcessInvalidTx (pfrom.GetId (), ptx, state, /* first_time_failure =*/ true );
4578
4578
}
4579
4579
// When a transaction fails for TX_RECONSIDERABLE, look for a matching child in the
4580
4580
// orphanage, as it is possible that they succeed as a package.
0 commit comments