diff --git a/src/net_processing.cpp b/src/net_processing.cpp --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -808,6 +808,21 @@ /** Storage for orphan information */ TxOrphanage m_orphanage; + void AddToCompactExtraTransactions(const CTransactionRef &tx) + EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans); + + /** + * Orphan/conflicted/etc transactions that are kept for compact block + * reconstruction. + * The last + * -blockreconstructionextratxn/DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN of + * these are kept in a ring buffer + */ + std::vector> + vExtraTxnForCompact GUARDED_BY(g_cs_orphans); + /** Offset into vExtraTxnForCompact to insert the next tx */ + size_t vExtraTxnForCompactIt GUARDED_BY(g_cs_orphans) = 0; + /** Number of peers from which we're downloading blocks. */ int nPeersWithValidatedDownloads GUARDED_BY(cs_main) = 0; @@ -839,17 +854,6 @@ /** Number of preferable block download peers. */ int nPreferredDownload GUARDED_BY(cs_main) = 0; - -/** - * Orphan/conflicted/etc transactions that are kept for compact block - * reconstruction. - * The last -blockreconstructionextratxn/DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN - * of these are kept in a ring buffer - */ -static std::vector> - vExtraTxnForCompact GUARDED_BY(g_cs_orphans); -/** Offset into vExtraTxnForCompact to insert the next tx */ -static size_t vExtraTxnForCompactIt GUARDED_BY(g_cs_orphans) = 0; } // namespace namespace { @@ -1734,8 +1738,7 @@ return true; } -static void AddToCompactExtraTransactions(const CTransactionRef &tx) - EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans) { +void PeerManagerImpl::AddToCompactExtraTransactions(const CTransactionRef &tx) { size_t max_extra_txn = gArgs.GetArg("-blockreconstructionextratxn", DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN); if (max_extra_txn <= 0) {