 |
Bitcoin Core
22.99.0
P2P Digital Currency
|
Go to the documentation of this file.
5 #ifndef BITCOIN_TXORPHANAGE_H
6 #define BITCOIN_TXORPHANAGE_H
54 return m_orphans.size();
82 std::map<COutPoint, std::set<OrphanMap::iterator, IteratorComparator>> m_outpoint_to_orphan_it
GUARDED_BY(
g_cs_orphans);
92 #endif // BITCOIN_TXORPHANAGE_H
int EraseTx(const uint256 &txid) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans)
Erase an orphan by txid.
A generic txid reference (txid or wtxid).
bool HaveTx(const GenTxid >xid) const LOCKS_EXCLUDED(std::pair< CTransactionRef, NodeId > GetTx(const uint256 &txid) const EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans)
Check if we already have an orphan transaction (by txid or wtxid)
std::shared_ptr< const CTransaction > CTransactionRef
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.
The basic transaction that is broadcasted on the network and contained in blocks.
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 hav...
bool operator()(const I &a, const I &b) const
decltype(m_orphans) OrphanMap
RecursiveMutex g_cs_orphans
Guards orphan transactions and extra txs for compact blocks.
size_t Size() LOCKS_EXCLUDED(
Return how many entries exist in the orphange.
#define LOCKS_EXCLUDED(...)
#define EXCLUSIVE_LOCKS_REQUIRED(...)
std::map< uint256, OrphanTx > m_orphans GUARDED_BY(g_cs_orphans)
Map from txid to orphan transaction record.
bool AddTx(const CTransactionRef &tx, NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans)
Add a new orphan transaction.
A class to track orphan transactions (failed on TX_MISSING_INPUTS) Since we cannot distinguish orphan...
void EraseForPeer(NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans)
Erase all orphans announced by a peer (eg, after that peer disconnects)