5#ifndef BITCOIN_NODE_TXDOWNLOADMAN_IMPL_H
6#define BITCOIN_NODE_TXDOWNLOADMAN_IMPL_H
95 :
m_opts{options},
m_rng{options.m_deterministic_txrequest},
138 std::chrono::microseconds now);
142 std::chrono::microseconds current_time);
159 NodeId nodeid,
bool first_time_failure);
162 std::pair<bool, std::optional<PackageToValidate>>
187 std::chrono::microseconds now);
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 ...
CRollingBloomFilter m_recent_confirmed_transactions
Filter for transactions that have been recently confirmed.
CRollingBloomFilter m_recent_rejects
Filter for transactions that were recently rejected by the mempool.
InvRequestTracker< TxId > m_txrequest
Tracks candidates for requesting and downloading transaction data.
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()
void DisconnectedPeer(NodeId nodeid)
bool HaveMoreWork(NodeId nodeid)
bool MaybeAddOrphanResolutionCandidate(const std::vector< TxId > &unique_parents, const TxId &txid, NodeId nodeid, std::chrono::microseconds now)
If this peer is an orphan resolution candidate for this transaction, treat the unique_parents as anno...
RejectedTxTodo MempoolRejectedTx(const CTransactionRef &ptx, const TxValidationState &state, NodeId nodeid, bool first_time_failure)
std::pair< bool, std::optional< PackageToValidate > > ReceivedTx(NodeId nodeid, const CTransactionRef &ptx)
void MempoolAcceptedTx(const CTransactionRef &tx)
void ReceivedNotFound(NodeId nodeid, const std::vector< TxId > &txids)
Marks a tx as ReceivedResponse in txrequest.
void ConnectedPeer(NodeId nodeid, const TxDownloadConnectionInfo &info)
std::map< NodeId, PeerInfo > m_peer_info
Information for all of the peers we may download transactions from.
std::vector< TxId > GetRequestsToSend(NodeId nodeid, std::chrono::microseconds current_time)
Get getdata requests to send.
CRollingBloomFilter m_recent_rejects_package_reconsiderable
Filter for: (1) txids of transactions that were recently rejected by the mempool but are eligible for...
bool AlreadyHaveTx(const TxId &txid, bool include_reconsiderable)
Check whether we already have this txid in:
TxDownloadManagerImpl(const TxDownloadOptions &options)
std::vector< TxOrphanage::PoolTx > GetOrphanTransactions() const
void BlockConnected(const std::shared_ptr< const CBlock > &pblock)
CTransactionRef GetTxToReconsider(NodeId nodeid)
std::vector< TxId > GetUniqueParents(const CTransaction &tx)
Helper for getting deduplicated vector of Txids in vin.
CRollingBloomFilter & RecentRejectsPackageReconsiderableFilter()
bool AddTxAnnouncement(NodeId peer, const TxId &txid, std::chrono::microseconds now)
Consider adding this tx hash to txrequest.
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
A TxId is the identifier of a transaction.
PeerInfo(const TxDownloadConnectionInfo &info)
const TxDownloadConnectionInfo m_connection_info
Information relevant to scheduling tx requests.