[txrequest] GetCandidatePeers

Needed for a later commit adding logic to ask the TxRequestTracker for a
list of announcers.  These announcers should know the parents of the
transaction they announced.
This commit is contained in:
glozow
2023-03-20 10:37:23 +00:00
parent b1f0f3c288
commit 6951ddcefd
2 changed files with 21 additions and 0 deletions

View File

@@ -195,6 +195,9 @@ public:
/** Count how many announcements are being tracked in total across all peers and transaction hashes. */
size_t Size() const;
/** For some tx return all peers with non-COMPLETED announcements for its txid or wtxid. The resulting vector may contain duplicate NodeIds. */
std::vector<NodeId> GetCandidatePeers(const CTransactionRef& tx) const;
/** Access to the internal priority computation (testing only) */
uint64_t ComputePriority(const uint256& txhash, NodeId peer, bool preferred) const;