Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/proofpool.h
Show First 20 Lines • Show All 135 Lines • ▼ Show 20 Lines | public: | ||||
void rescan(PeerManager &peerManager); | void rescan(PeerManager &peerManager); | ||||
ProofRef getProof(const ProofId &proofid) const; | ProofRef getProof(const ProofId &proofid) const; | ||||
ProofRef getProof(const COutPoint &outpoint) const; | ProofRef getProof(const COutPoint &outpoint) const; | ||||
ProofRef getLowestScoreProof() const; | ProofRef getLowestScoreProof() const; | ||||
std::optional<int64_t> getRegistrationTime(const ProofId &proofid) const; | std::optional<int64_t> getRegistrationTime(const ProofId &proofid) const; | ||||
/** Remove all proofs that have been registered before the cutoff time */ | |||||
void removeObsoleteProofs(std::chrono::seconds cutoffTime); | |||||
size_t size() const { return pool.size(); } | size_t size() const { return pool.size(); } | ||||
size_t countProofs() { return registrationTimes.size(); }; | size_t countProofs() { return registrationTimes.size(); }; | ||||
}; | }; | ||||
} // namespace avalanche | } // namespace avalanche | ||||
#endif // BITCOIN_AVALANCHE_PROOFPOOL_H | #endif // BITCOIN_AVALANCHE_PROOFPOOL_H |