Bitcoin Core  22.99.0
P2P Digital Currency
Public Member Functions | List of all members
TxOrphanageTest Class Reference
Inheritance diagram for TxOrphanageTest:
Collaboration diagram for TxOrphanageTest:

Public Member Functions

size_t CountOrphans () const EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans)
CTransactionRef RandomOrphan () EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans)
- Public Member Functions inherited from TxOrphanage
bool AddTx (const CTransactionRef &tx, NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans)
 Add a new orphan transaction. More...
int EraseTx (const uint256 &txid) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans)
 Erase an orphan by txid. More...
void EraseForPeer (NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans)
 Erase all orphans announced by a peer (eg, after that peer disconnects) More...
void AddChildrenToWorkSet (const CTransaction &tx, std::set< uint256 > &orphan_work_set) const 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) More...
size_t Size () LOCKS_EXCLUDED(
 Return how many entries exist in the orphange. More...

Additional Inherited Members

- Public Attributes inherited from TxOrphanage
bool HaveTx(const GenTxid &gtxid) const LOCKS_EXCLUDED(std::pair< CTransactionRef, NodeIdGetTx (const uint256 &txid) const EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans)
 Check if we already have an orphan transaction (by txid or wtxid) More...
void EraseForBlock(const CBlock &block) LOCKS_EXCLUDED(unsigned int LimitOrphans (unsigned int max_orphans) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans)
 Erase all orphans included in or invalidated by a new block. More...
- Protected Types inherited from TxOrphanage
using OrphanMap = decltype(m_orphans)
- Protected Member Functions inherited from TxOrphanage
std::map< uint256, OrphanTx > m_orphans GUARDED_BY (g_cs_orphans)
 Map from txid to orphan transaction record. More...
std::map< COutPoint, std::set< OrphanMap::iterator, IteratorComparator > > m_outpoint_to_orphan_it GUARDED_BY (g_cs_orphans)
 Index from the parents' COutPoint into the m_orphans. More...
std::vector< OrphanMap::iterator > m_orphan_list GUARDED_BY (g_cs_orphans)
 Orphan transactions in vector for quick random eviction. More...
std::map< uint256, OrphanMap::iterator > m_wtxid_to_orphan_it GUARDED_BY (g_cs_orphans)
 Index from wtxid into the m_orphans to lookup orphan transactions using their witness ids. More...

Detailed Description

Definition at line 315 of file denialofservice_tests.cpp.

Member Function Documentation

◆ CountOrphans()

size_t TxOrphanageTest::CountOrphans ( ) const

Definition at line 318 of file denialofservice_tests.cpp.

Here is the caller graph for this function:

◆ RandomOrphan()

CTransactionRef TxOrphanageTest::RandomOrphan ( )

Definition at line 323 of file denialofservice_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: