Clio
develop
The XRP Ledger API server.
Theme:
Default
Round
Robot
Toggle main menu visibility
Loading...
Searching...
No Matches
NetworkValidatedLedgersInterface.hpp
Go to the documentation of this file.
1
2
#pragma once
3
4
#include <boost/signals2/connection.hpp>
5
#include <boost/signals2/signal.hpp>
6
#include <boost/signals2/variadic_signal.hpp>
7
8
#include <cstdint>
9
#include <optional>
10
11
namespace
etl {
12
16
class
NetworkValidatedLedgersInterface
{
17
public
:
18
using
SignalType = boost::signals2::signal<void(uint32_t)>;
19
20
virtual
~NetworkValidatedLedgersInterface
() =
default
;
21
27
virtual
void
28
push
(uint32_t idx) = 0;
29
39
[[nodiscard]]
virtual
std::optional<uint32_t>
40
getMostRecent
() = 0;
41
51
virtual
bool
52
waitUntilValidatedByNetwork
(uint32_t sequence, std::optional<uint32_t> maxWaitMs = {}) = 0;
53
60
[[nodiscard]]
virtual
boost::signals2::scoped_connection
61
subscribe
(SignalType::slot_type
const
& subscriber) = 0;
62
};
63
64
}
// namespace etl
etl::NetworkValidatedLedgersInterface
An interface for NetworkValidatedLedgers.
Definition
NetworkValidatedLedgersInterface.hpp:16
etl::NetworkValidatedLedgersInterface::push
virtual void push(uint32_t idx)=0
Notify the datastructure that idx has been validated by the network.
etl::NetworkValidatedLedgersInterface::waitUntilValidatedByNetwork
virtual bool waitUntilValidatedByNetwork(uint32_t sequence, std::optional< uint32_t > maxWaitMs={})=0
Waits for the sequence to be validated by the network.
etl::NetworkValidatedLedgersInterface::getMostRecent
virtual std::optional< uint32_t > getMostRecent()=0
Get most recently validated sequence.
etl::NetworkValidatedLedgersInterface::subscribe
virtual boost::signals2::scoped_connection subscribe(SignalType::slot_type const &subscriber)=0
Allows clients to get notified when a new validated ledger becomes known to Clio.
src
etl
NetworkValidatedLedgersInterface.hpp
Generated by
1.17.0