@@ -590,7 +590,7 @@ class PeerManagerImpl final : public PeerManager
590
590
bool MaybeDiscourageAndDisconnect (CNode& pnode, Peer& peer);
591
591
592
592
void ProcessOrphanTx (std::set<uint256>& orphan_work_set) EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_cs_orphans)
593
- EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex);
593
+ EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex, g_msgproc_mutex );
594
594
/* * Process a single headers message from a peer.
595
595
*
596
596
* @param[in] pfrom CNode of the peer
@@ -924,14 +924,14 @@ class PeerManagerImpl final : public PeerManager
924
924
/* * Storage for orphan information */
925
925
TxOrphanage m_orphanage;
926
926
927
- void AddToCompactExtraTransactions (const CTransactionRef& tx) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans );
927
+ void AddToCompactExtraTransactions (const CTransactionRef& tx) EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex );
928
928
929
929
/* * Orphan/conflicted/etc transactions that are kept for compact block reconstruction.
930
930
* The last -blockreconstructionextratxn/DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN of
931
931
* these are kept in a ring buffer */
932
- std::vector<std::pair<uint256, CTransactionRef>> vExtraTxnForCompact GUARDED_BY (g_cs_orphans );
932
+ std::vector<std::pair<uint256, CTransactionRef>> vExtraTxnForCompact GUARDED_BY (g_msgproc_mutex );
933
933
/* * Offset into vExtraTxnForCompact to insert the next tx */
934
- size_t vExtraTxnForCompactIt GUARDED_BY (g_cs_orphans ) = 0;
934
+ size_t vExtraTxnForCompactIt GUARDED_BY (g_msgproc_mutex ) = 0;
935
935
936
936
/* * Check whether the last unknown block a peer advertised is not yet known. */
937
937
void ProcessBlockAvailability (NodeId nodeid) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
@@ -2885,6 +2885,7 @@ void PeerManagerImpl::ProcessHeadersMessage(CNode& pfrom, Peer& peer,
2885
2885
*/
2886
2886
void PeerManagerImpl::ProcessOrphanTx (std::set<uint256>& orphan_work_set)
2887
2887
{
2888
+ AssertLockHeld (g_msgproc_mutex);
2888
2889
AssertLockHeld (cs_main);
2889
2890
AssertLockHeld (g_cs_orphans);
2890
2891
0 commit comments