Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
etl::impl::LedgerLoader< LoadBalancerType, LedgerFetcherType > Class Template Reference

Loads ledger data into the DB. More...

#include <LedgerLoader.hpp>

Public Types

using GetLedgerResponseType = typename LoadBalancerType::GetLedgerResponseType
 
using OptionalGetLedgerResponseType = typename LoadBalancerType::OptionalGetLedgerResponseType
 
using RawLedgerObjectType = typename LoadBalancerType::RawLedgerObjectType
 

Public Member Functions

 LedgerLoader (std::shared_ptr< BackendInterface > backend, std::shared_ptr< LoadBalancerType > balancer, LedgerFetcherType &fetcher, SystemState const &state)
 Create an instance of the loader.
 
FormattedTransactionsData insertTransactions (ripple::LedgerHeader const &ledger, GetLedgerResponseType &data)
 Insert extracted transaction into the ledger.
 
std::optional< ripple::LedgerHeader > loadInitialLedger (uint32_t sequence)
 Download a ledger with specified sequence in full.
 

Detailed Description

template<typename LoadBalancerType, typename LedgerFetcherType>
class etl::impl::LedgerLoader< LoadBalancerType, LedgerFetcherType >

Loads ledger data into the DB.

Member Function Documentation

◆ insertTransactions()

template<typename LoadBalancerType , typename LedgerFetcherType >
FormattedTransactionsData etl::impl::LedgerLoader< LoadBalancerType, LedgerFetcherType >::insertTransactions ( ripple::LedgerHeader const & ledger,
GetLedgerResponseType & data )
inline

Insert extracted transaction into the ledger.

Insert all of the extracted transactions into the ledger, returning transactions related to accounts, transactions related to NFTs, and NFTs themselves for later processsing.

Parameters
ledgerledger to insert transactions into
datadata extracted from an ETL source
Returns
The neccessary info to write the account_transactions/account_tx and nft_token_transactions tables

◆ loadInitialLedger()

template<typename LoadBalancerType , typename LedgerFetcherType >
std::optional< ripple::LedgerHeader > etl::impl::LedgerLoader< LoadBalancerType, LedgerFetcherType >::loadInitialLedger ( uint32_t sequence)
inline

Download a ledger with specified sequence in full.

Note: This takes several minutes or longer.

Parameters
sequencethe sequence of the ledger to download
Returns
The ledger downloaded, with a full transaction and account state map

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