From cd32ebd3f4688add64a28ec34342198e2374ef62 Mon Sep 17 00:00:00 2001 From: Greg Sanders Date: Mon, 29 Jun 2026 10:18:20 -0400 Subject: [PATCH] Release cs_main between individual private tx re-attempts This queue may be hundreds to thousands of items, each of which are being revalidated at short interval. Allow the node to be more responsive in this scenario. Github-Pull: #35406 Rebased-From: cbf8c107c12f53045d584f5286337d45f1080954 --- src/net_processing.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 1e2c51af868..c21c5db79bf 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1649,8 +1649,9 @@ void PeerManagerImpl::ReattemptPrivateBroadcast(CScheduler& scheduler) size_t num_for_rebroadcast{0}; const auto stale_txs = m_tx_for_private_broadcast.GetStale(); if (!stale_txs.empty()) { - LOCK(cs_main); for (const auto& stale_tx : stale_txs) { + // Only hold lock per single submission + LOCK(cs_main); auto mempool_acceptable = m_chainman.ProcessTransaction(stale_tx, /*test_accept=*/true); if (mempool_acceptable.m_result_type == MempoolAcceptResult::ResultType::VALID) { LogDebug(BCLog::PRIVBROADCAST,