Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
etl::impl::GrpcSource Class Reference

Public Member Functions

 GrpcSource (std::string const &ip, std::string const &grpcPort, std::shared_ptr< BackendInterface > backend)
 
std::pair< grpc::Status, org::xrpl::rpc::v1::GetLedgerResponse > fetchLedger (uint32_t sequence, bool getObjects=true, bool getObjectNeighbors=false)
 Fetch data for a specific ledger.
 
std::pair< std::vector< std::string >, bool > loadInitialLedger (uint32_t sequence, uint32_t numMarkers, bool cacheOnly=false)
 Download a ledger in full.
 

Member Function Documentation

◆ fetchLedger()

std::pair< grpc::Status, org::xrpl::rpc::v1::GetLedgerResponse > etl::impl::GrpcSource::fetchLedger ( uint32_t sequence,
bool getObjects = true,
bool getObjectNeighbors = false )

Fetch data for a specific ledger.

This function will continuously try to fetch data for the specified ledger until the fetch succeeds, the ledger is found in the database, or the server is shutting down.

Parameters
sequenceSequence of the ledger to fetch
getObjectsWhether to get the account state diff between this ledger and the prior one; defaults to true
getObjectNeighborsWhether to request object neighbors; defaults to false
Returns
A std::pair of the response status and the response itself

◆ loadInitialLedger()

std::pair< std::vector< std::string >, bool > etl::impl::GrpcSource::loadInitialLedger ( uint32_t sequence,
uint32_t numMarkers,
bool cacheOnly = false )

Download a ledger in full.

Parameters
sequenceSequence of the ledger to download
numMarkersNumber of markers to generate for async calls
cacheOnlyOnly insert into cache, not the DB; defaults to false
Returns
A std::pair of the data and a bool indicating whether the download was successful

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