4 #ifndef BITCOIN_NODE_TXDOWNLOADMAN_IMPL_H 5 #define BITCOIN_NODE_TXDOWNLOADMAN_IMPL_H 204 #endif // BITCOIN_NODE_TXDOWNLOADMAN_IMPL_H std::shared_ptr< const CTransaction > CTransactionRef
PeerInfo(const TxDownloadConnectionInfo &info)
std::pair< bool, std::optional< PackageToValidate > > ReceivedTx(NodeId nodeid, const CTransactionRef &ptx)
bool MaybeAddOrphanResolutionCandidate(const std::vector< Txid > &unique_parents, const Wtxid &wtxid, NodeId nodeid, std::chrono::microseconds now)
If this peer is an orphan resolution candidate for this transaction, treat the unique_parents as anno...
Data structure to keep track of, and schedule, transaction downloads from peers.
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, skipping any combinations that have already been tried.
CRollingBloomFilter & RecentConfirmedTransactionsFilter()
TxRequestTracker m_txrequest
Tracks candidates for requesting and downloading transaction data.
TxOrphanage m_orphanage
Manages unvalidated tx data (orphan transactions for which we are downloading ancestors).
A class to track orphan transactions (failed on TX_MISSING_INPUTS) Since we cannot distinguish orphan...
std::vector< CTransactionRef > Package
A package is an ordered list of transactions.
RejectedTxTodo MempoolRejectedTx(const CTransactionRef &ptx, const TxValidationState &state, NodeId nodeid, bool first_time_failure)
void BlockConnected(const std::shared_ptr< const CBlock > &pblock)
void MempoolRejectedPackage(const Package &package)
RollingBloomFilter is a probabilistic "keep track of most recently inserted" set. ...
bool AddTxAnnouncement(NodeId peer, const GenTxid >xid, std::chrono::microseconds now)
Consider adding this tx hash to txrequest.
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...
std::vector< Txid > GetUniqueParents(const CTransaction &tx)
Helper for getting deduplicated vector of Txids in vin.
void ReceivedNotFound(NodeId nodeid, const std::vector< uint256 > &txhashes)
Marks a tx as ReceivedResponse in txrequest.
CRollingBloomFilter & RecentRejectsFilter()
std::map< NodeId, PeerInfo > m_peer_info
Information for all of the peers we may download transactions from.
CRollingBloomFilter & RecentRejectsReconsiderableFilter()
bool HaveMoreWork(NodeId nodeid)
TxDownloadManagerImpl(const TxDownloadOptions &options)
std::unique_ptr< CRollingBloomFilter > m_lazy_recent_rejects
Filter for transactions that were recently rejected by the mempool.
std::vector< GenTxid > GetRequestsToSend(NodeId nodeid, std::chrono::microseconds current_time)
Get getdata requests to send.
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
std::unique_ptr< CRollingBloomFilter > m_lazy_recent_confirmed_transactions
const TxDownloadConnectionInfo m_connection_info
Information relevant to scheduling tx requests.
uint32_t m_num_wtxid_peers
Number of wtxid relay peers we have in m_peer_info.
void MempoolAcceptedTx(const CTransactionRef &tx)
CTransactionRef GetTxToReconsider(NodeId nodeid)
The basic transaction that is broadcasted on the network and contained in blocks. ...
std::vector< TxOrphanage::OrphanTxBase > GetOrphanTransactions() const
void ConnectedPeer(NodeId nodeid, const TxDownloadConnectionInfo &info)
bool AlreadyHaveTx(const GenTxid >xid, bool include_reconsiderable)
Check whether we already have this gtxid in:
void DisconnectedPeer(NodeId nodeid)
A generic txid reference (txid or wtxid).
transaction_identifier represents the two canonical transaction identifier types (txid, wtxid).