mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 13:42:10 +02:00
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: cbf8c107c1
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user