Skip to content

Commit 76ea17c

Browse files
Add mutex requirement for AddToCompactExtraTransactions(…)
The vector `vExtraTxnForCompact`, which is guarded by the mutex `cs_main`, is accessed in `AddToCompactExtraTransactions(…)`.
1 parent 4616c82 commit 76ea17c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net_processing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) {
560560
// mapOrphanTransactions
561561
//
562562

563-
void AddToCompactExtraTransactions(const CTransactionRef& tx)
563+
void AddToCompactExtraTransactions(const CTransactionRef& tx) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
564564
{
565565
size_t max_extra_txn = gArgs.GetArg("-blockreconstructionextratxn", DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN);
566566
if (max_extra_txn <= 0)

0 commit comments

Comments
 (0)