24#include <condition_variable>
42 std::optional<uint32_t> max_;
44 mutable std::mutex m_;
45 std::condition_variable cv_;
53 static std::shared_ptr<NetworkValidatedLedgers>
62 push(uint32_t idx)
final;
71 std::optional<uint32_t>
An interface for NetworkValidatedLedgers.
Definition NetworkValidatedLedgersInterface.hpp:30
This datastructure is used to keep track of the sequence of the most recent ledger validated by the n...
Definition NetworkValidatedLedgers.hpp:40
void push(uint32_t idx) final
Notify the datastructure that idx has been validated by the network.
Definition NetworkValidatedLedgers.cpp:36
bool waitUntilValidatedByNetwork(uint32_t sequence, std::optional< uint32_t > maxWaitMs={}) final
Waits for the sequence to be validated by the network.
Definition NetworkValidatedLedgers.cpp:53
static std::shared_ptr< NetworkValidatedLedgers > makeValidatedLedgers()
A factory function for NetworkValidatedLedgers.
Definition NetworkValidatedLedgers.cpp:30
std::optional< uint32_t > getMostRecent() final
Get most recently validated sequence.
Definition NetworkValidatedLedgers.cpp:45
This namespace contains everything to do with the ETL and ETL sources.
Definition CacheLoader.hpp:36