Changeset View
Changeset View
Standalone View
Standalone View
src/txrequest.h
Show First 20 Lines • Show All 235 Lines • ▼ Show 20 Lines | public: | ||||
/** Count how many announcements a peer has (REQUESTED, CANDIDATE, and | /** Count how many announcements a peer has (REQUESTED, CANDIDATE, and | ||||
* COMPLETED combined). */ | * COMPLETED combined). */ | ||||
size_t Count(NodeId peer) const; | size_t Count(NodeId peer) const; | ||||
/** Count how many announcements are being tracked in total across all peers | /** Count how many announcements are being tracked in total across all peers | ||||
* and transaction hashes. */ | * and transaction hashes. */ | ||||
size_t Size() const; | size_t Size() const; | ||||
/** Access to the internal priority computation (testing only) */ | |||||
uint64_t ComputePriority(const uint256 &txhash, NodeId peer, | |||||
bool preferred) const; | |||||
/** Run internal consistency check (testing only). */ | |||||
void SanityCheck() const; | |||||
/** Run a time-dependent internal consistency check (testing only). | |||||
* | |||||
* This can only be called immediately after GetRequestable, with the same | |||||
* 'now' parameter. | |||||
*/ | |||||
void PostGetRequestableSanityCheck(std::chrono::microseconds now) const; | |||||
}; | }; | ||||
#endif // BITCOIN_TXREQUEST_H | #endif // BITCOIN_TXREQUEST_H |