xrpld
Loading...
Searching...
No Matches
xrpl::AcceptedLedger Class Reference

A ledger that has become irrevocable. More...

#include <AcceptedLedger.h>

Inheritance diagram for xrpl::AcceptedLedger:
Collaboration diagram for xrpl::AcceptedLedger:

Public Member Functions

 AcceptedLedger (std::shared_ptr< ReadView const > ledger)
std::shared_ptr< ReadView const > const & getLedger () const
std::size_t size () const
auto begin () const
auto end () const
AcceptedLedgerTx const & back () const
 The last accepted transaction.

Public Attributes

friend Object

Static Private Member Functions

static auto & getCounter () noexcept

Private Attributes

std::shared_ptr< ReadView const > ledger_
std::vector< std::unique_ptr< AcceptedLedgerTx > > transactions_

Detailed Description

A ledger that has become irrevocable.

An accepted ledger is a ledger that has a sufficient number of validations to convince the local server that it is irrevocable.

The existence of an accepted ledger implies all preceding ledgers are accepted.

Definition at line 31 of file AcceptedLedger.h.

Constructor & Destructor Documentation

◆ AcceptedLedger()

xrpl::AcceptedLedger::AcceptedLedger ( std::shared_ptr< ReadView const > ledger)

Definition at line 12 of file AcceptedLedger.cpp.

Member Function Documentation

◆ getLedger()

std::shared_ptr< ReadView const > const & xrpl::AcceptedLedger::getLedger ( ) const
nodiscard

Definition at line 37 of file AcceptedLedger.h.

◆ size()

std::size_t xrpl::AcceptedLedger::size ( ) const
nodiscard

Definition at line 43 of file AcceptedLedger.h.

◆ begin()

auto xrpl::AcceptedLedger::begin ( ) const
nodiscard

Definition at line 49 of file AcceptedLedger.h.

◆ end()

auto xrpl::AcceptedLedger::end ( ) const
nodiscard

Definition at line 55 of file AcceptedLedger.h.

◆ back()

AcceptedLedgerTx const & xrpl::AcceptedLedger::back ( ) const
nodiscard

The last accepted transaction.

Precondition: size() > 0.

Definition at line 64 of file AcceptedLedger.h.

◆ getCounter()

auto & xrpl::CountedObject< AcceptedLedger >::getCounter ( )
staticprivatenoexceptinherited

Definition at line 113 of file CountedObject.h.

Member Data Documentation

◆ ledger_

std::shared_ptr<ReadView const> xrpl::AcceptedLedger::ledger_
private

Definition at line 70 of file AcceptedLedger.h.

◆ transactions_

std::vector<std::unique_ptr<AcceptedLedgerTx> > xrpl::AcceptedLedger::transactions_
private

Definition at line 71 of file AcceptedLedger.h.

◆ Object

Definition at line 138 of file CountedObject.h.