aboutsummaryrefslogtreecommitdiff
path: root/src/txorphanage.h
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2021-02-15 22:53:06 +1000
committerAnthony Towns <aj@erisian.com.au>2021-02-27 01:08:09 +1000
commitf8c0688b9490c8d4902530ba3c3b6fbd8b48e0de (patch)
tree0d11b535636c6c46064266c43f90b9bc4b096da5 /src/txorphanage.h
parent6bd4963c069bfd0af420e8a3fb724c3b693a1e76 (diff)
downloadbitcoin-f8c0688b9490c8d4902530ba3c3b6fbd8b48e0de.tar.xz
scripted-diff: Update txorphanage naming convention
-BEGIN VERIFY SCRIPT- sed -i 's/mapOrphanTransactionsByPrev/m_outpoint_to_orphan_it/g' src/txorphanage.h src/txorphanage.cpp sed -i 's/mapOrphanTransactions/m_orphans/g' src/txorphanage.h src/txorphanage.cpp src/net_processing.cpp src/test/denialofservice_tests.cpp sed -i 's/g_orphan_list/m_orphan_list/g' src/txorphanage.h src/txorphanage.cpp sed -i 's/g_orphans_by_wtxid/m_wtxid_to_orphan_it/g' src/txorphanage.h src/txorphanage.cpp sed -i 's/nMaxOrphans/max_orphans/g' src/txorphanage.h src/txorphanage.cpp sed -i 's/COrphanTx/OrphanTx/g' src/txorphanage.h src/txorphanage.cpp src/test/denialofservice_tests.cpp -END VERIFY SCRIPT-
Diffstat (limited to 'src/txorphanage.h')
-rw-r--r--src/txorphanage.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/txorphanage.h b/src/txorphanage.h
index 6b9837815b..a5e6764d75 100644
--- a/src/txorphanage.h
+++ b/src/txorphanage.h
@@ -36,14 +36,14 @@ public:
void EraseForBlock(const CBlock& block) EXCLUSIVE_LOCKS_REQUIRED(!g_cs_orphans);
/** Limit the orphanage to the given maximum */
- unsigned int LimitOrphans(unsigned int nMaxOrphans) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans);
+ unsigned int LimitOrphans(unsigned int max_orphans) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans);
/** Add any orphans that list a particular tx as a parent into a peer's work set
* (ie orphans that may have found their final missing parent, and so should be reconsidered for the mempool) */
void AddChildrenToWorkSet(const CTransaction& tx, std::set<uint256>& orphan_work_set) const EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans);
protected:
- struct COrphanTx {
+ struct OrphanTx {
CTransactionRef tx;
NodeId fromPeer;
int64_t nTimeExpire;
@@ -52,9 +52,9 @@ protected:
/** Map from txid to orphan transaction record. Limited by
* -maxorphantx/DEFAULT_MAX_ORPHAN_TRANSACTIONS */
- std::map<uint256, COrphanTx> mapOrphanTransactions GUARDED_BY(g_cs_orphans);
+ std::map<uint256, OrphanTx> m_orphans GUARDED_BY(g_cs_orphans);
- using OrphanMap = decltype(mapOrphanTransactions);
+ using OrphanMap = decltype(m_orphans);
struct IteratorComparator
{
@@ -65,16 +65,16 @@ protected:
}
};
- /** Index from the parents' COutPoint into the mapOrphanTransactions. Used
- * to remove orphan transactions from the mapOrphanTransactions */
- std::map<COutPoint, std::set<OrphanMap::iterator, IteratorComparator>> mapOrphanTransactionsByPrev GUARDED_BY(g_cs_orphans);
+ /** Index from the parents' COutPoint into the m_orphans. Used
+ * to remove orphan transactions from the m_orphans */
+ std::map<COutPoint, std::set<OrphanMap::iterator, IteratorComparator>> m_outpoint_to_orphan_it GUARDED_BY(g_cs_orphans);
/** Orphan transactions in vector for quick random eviction */
- std::vector<OrphanMap::iterator> g_orphan_list GUARDED_BY(g_cs_orphans);
+ std::vector<OrphanMap::iterator> m_orphan_list GUARDED_BY(g_cs_orphans);
- /** Index from wtxid into the mapOrphanTransactions to lookup orphan
+ /** Index from wtxid into the m_orphans to lookup orphan
* transactions using their witness ids. */
- std::map<uint256, OrphanMap::iterator> g_orphans_by_wtxid GUARDED_BY(g_cs_orphans);
+ std::map<uint256, OrphanMap::iterator> m_wtxid_to_orphan_it GUARDED_BY(g_cs_orphans);
};
#endif // BITCOIN_TXORPHANAGE_H