TxRequestTracker

Schedules and tracks pending transaction requests to peers.

Synopsis

Declared in <txrequest.h>

class TxRequestTracker;

Member Functions

NameDescription
TxRequestTracker [constructor]Construct a TxRequestTracker.
~TxRequestTracker [destructor]Destroy the TxRequestTracker.
ComputePriority Access to the internal priority computation (testing only)
Count Count how many announcements a peer has (REQUESTED, CANDIDATE, and COMPLETED combined).
CountCandidates Count how many CANDIDATE announcements a peer has.
CountInFlight Count how many REQUESTED announcements a peer has.
DisconnectedPeer Deletes all announcements for a given peer.
ForgetTxHash Deletes all announcements for a given txhash (both txid and wtxid ones).
GetCandidatePeers For some txhash (txid or wtxid), finds all peers with non-COMPLETED announcements and appends them to result_peers. Does not try to ensure that result_peers contains no duplicates.
GetRequestable Find the txids to request now from peer.
PostGetRequestableSanityCheck Run a time-dependent internal consistency check (testing only).
ReceivedInv Adds a new CANDIDATE announcement.
ReceivedResponse Converts a CANDIDATE or REQUESTED announcement to a COMPLETED one. If no such announcement exists for the provided peer and txhash, nothing happens.
RequestedTx Marks a transaction as requested, with a specified expiry.
SanityCheck Run internal consistency check (testing only).
Size Count how many announcements are being tracked in total across all peers and transaction hashes.