Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
etl::NetworkValidatedLedgersInterface Class Referenceabstract

An interface for NetworkValidatedLedgers. More...

#include <NetworkValidatedLedgersInterface.hpp>

Inheritance diagram for etl::NetworkValidatedLedgersInterface:

Public Member Functions

virtual void push (uint32_t idx)=0
 Notify the datastructure that idx has been validated by the network.
 
virtual std::optional< uint32_t > getMostRecent ()=0
 Get most recently validated sequence.
 
virtual bool waitUntilValidatedByNetwork (uint32_t sequence, std::optional< uint32_t > maxWaitMs={})=0
 Waits for the sequence to be validated by the network.
 

Detailed Description

An interface for NetworkValidatedLedgers.

Member Function Documentation

◆ getMostRecent()

virtual std::optional< uint32_t > etl::NetworkValidatedLedgersInterface::getMostRecent ( )
pure virtual

Get most recently validated sequence.

If no ledgers are known to have been validated, this function waits until the next ledger is validated

Returns
Sequence of most recently validated ledger. empty optional if the datastructure has been stopped

Implemented in etl::NetworkValidatedLedgers.

◆ push()

virtual void etl::NetworkValidatedLedgersInterface::push ( uint32_t idx)
pure virtual

Notify the datastructure that idx has been validated by the network.

Parameters
idxSequence validated by network

Implemented in etl::NetworkValidatedLedgers.

◆ waitUntilValidatedByNetwork()

virtual bool etl::NetworkValidatedLedgersInterface::waitUntilValidatedByNetwork ( uint32_t sequence,
std::optional< uint32_t > maxWaitMs = {} )
pure virtual

Waits for the sequence to be validated by the network.

Parameters
sequenceThe sequence to wait for
maxWaitMsMaximum time to wait for the sequence to be validated. If empty, wait indefinitely
Returns
true if sequence was validated, false otherwise a return value of false means the datastructure has been stopped

Implemented in etl::NetworkValidatedLedgers.


The documentation for this class was generated from the following file: