4#ifndef BITCOIN_NODE_TXDOWNLOADMAN_IMPL_H
5#define BITCOIN_NODE_TXDOWNLOADMAN_IMPL_H
RollingBloomFilter is a probabilistic "keep track of most recently inserted" set.
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
A generic txid reference (txid or wtxid).
A class to track orphan transactions (failed on TX_MISSING_INPUTS) Since we cannot distinguish orphan...
Data structure to keep track of, and schedule, transaction downloads from peers.
std::unique_ptr< CRollingBloomFilter > m_lazy_recent_confirmed_transactions
std::optional< PackageToValidate > Find1P1CPackage(const CTransactionRef &ptx, NodeId nodeid)
Look for a child of this transaction in the orphanage to form a 1-parent-1-child package,...
CRollingBloomFilter & RecentConfirmedTransactionsFilter()
bool AddTxAnnouncement(NodeId peer, const GenTxid >xid, std::chrono::microseconds now, bool p2p_inv)
Consider adding this tx hash to txrequest.
std::unique_ptr< CRollingBloomFilter > m_lazy_recent_rejects
Filter for transactions that were recently rejected by the mempool.
void ReceivedNotFound(NodeId nodeid, const std::vector< uint256 > &txhashes)
Marks a tx as ReceivedResponse in txrequest.
void DisconnectedPeer(NodeId nodeid)
bool HaveMoreWork(NodeId nodeid)
std::unique_ptr< CRollingBloomFilter > m_lazy_recent_rejects_reconsiderable
Filter for: (1) wtxids of transactions that were recently rejected by the mempool but are eligible fo...
TxRequestTracker m_txrequest
Tracks candidates for requesting and downloading transaction data.
std::pair< bool, std::optional< PackageToValidate > > ReceivedTx(NodeId nodeid, const CTransactionRef &ptx)
void MempoolAcceptedTx(const CTransactionRef &tx)
CRollingBloomFilter & RecentRejectsReconsiderableFilter()
RejectedTxTodo MempoolRejectedTx(const CTransactionRef &ptx, const TxValidationState &state, NodeId nodeid, bool first_time_failure)
std::vector< TxOrphanage::OrphanTxBase > GetOrphanTransactions() const
uint32_t m_num_wtxid_peers
Number of wtxid relay peers we have in m_peer_info.
void ConnectedPeer(NodeId nodeid, const TxDownloadConnectionInfo &info)
bool AlreadyHaveTx(const GenTxid >xid, bool include_reconsiderable)
Check whether we already have this gtxid in:
std::map< NodeId, PeerInfo > m_peer_info
Information for all of the peers we may download transactions from.
TxOrphanage m_orphanage
Manages unvalidated tx data (orphan transactions for which we are downloading ancestors).
TxDownloadManagerImpl(const TxDownloadOptions &options)
std::vector< GenTxid > GetRequestsToSend(NodeId nodeid, std::chrono::microseconds current_time)
Get getdata requests to send.
void BlockConnected(const std::shared_ptr< const CBlock > &pblock)
CTransactionRef GetTxToReconsider(NodeId nodeid)
CRollingBloomFilter & RecentRejectsFilter()
void MempoolRejectedPackage(const Package &package)
std::vector< CTransactionRef > Package
A package is an ordered list of transactions.
std::shared_ptr< const CTransaction > CTransactionRef
PeerInfo(const TxDownloadConnectionInfo &info)
const TxDownloadConnectionInfo m_connection_info
Information relevant to scheduling tx requests.