24#include <boost/signals2/connection.hpp>
25#include <boost/signals2/signal.hpp>
26#include <boost/signals2/variadic_signal.hpp>
28#include <condition_variable>
45 std::optional<uint32_t> latest_;
47 mutable std::mutex mtx_;
48 std::condition_variable cv_;
50 SignalType notificationChannel_;
58 static std::shared_ptr<NetworkValidatedLedgers>
67 push(uint32_t idx)
final;
76 std::optional<uint32_t>
90 boost::signals2::scoped_connection
91 subscribe(SignalType::slot_type
const& subscriber)
override;
An interface for NetworkValidatedLedgers.
Definition NetworkValidatedLedgersInterface.hpp:35
This datastructure is used to keep track of the sequence of the most recent ledger validated by the n...
Definition NetworkValidatedLedgers.hpp:44
void push(uint32_t idx) final
Notify the datastructure that idx has been validated by the network.
Definition NetworkValidatedLedgers.cpp:38
bool waitUntilValidatedByNetwork(uint32_t sequence, std::optional< uint32_t > maxWaitMs={}) final
Waits for the sequence to be validated by the network.
Definition NetworkValidatedLedgers.cpp:57
static std::shared_ptr< NetworkValidatedLedgers > makeValidatedLedgers()
A factory function for NetworkValidatedLedgers.
Definition NetworkValidatedLedgers.cpp:32
std::optional< uint32_t > getMostRecent() final
Get most recently validated sequence.
Definition NetworkValidatedLedgers.cpp:49
boost::signals2::scoped_connection subscribe(SignalType::slot_type const &subscriber) override
Allows clients to get notified when a new validated ledger becomes known to Clio.
Definition NetworkValidatedLedgers.cpp:70
This namespace contains everything to do with the ETL and ETL sources.
Definition CacheLoader.hpp:37