xrpld
Loading...
Searching...
No Matches
xrpl::SpanTip< Ledger > Class Template Reference

The tip of a span of ledger ancestry. More...

#include <LedgerTrie.h>

Collaboration diagram for xrpl::SpanTip< Ledger >:

Public Types

using Seq = Ledger::Seq
using ID = Ledger::ID

Public Member Functions

 SpanTip (Seq s, ID i, Ledger const lgr)
ID ancestor (Seq const &s) const
 Lookup the ID of an ancestor of the tip ledger.

Public Attributes

Seq seq
ID id

Private Attributes

Ledger const ledger_

Detailed Description

template<class Ledger>
class xrpl::SpanTip< Ledger >

The tip of a span of ledger ancestry.

Definition at line 21 of file LedgerTrie.h.

Member Typedef Documentation

◆ Seq

template<class Ledger>
using xrpl::SpanTip< Ledger >::Seq = Ledger::Seq

Definition at line 24 of file LedgerTrie.h.

◆ ID

template<class Ledger>
using xrpl::SpanTip< Ledger >::ID = Ledger::ID

Definition at line 25 of file LedgerTrie.h.

Constructor & Destructor Documentation

◆ SpanTip()

template<class Ledger>
xrpl::SpanTip< Ledger >::SpanTip ( Seq s,
ID i,
Ledger const lgr )

Definition at line 27 of file LedgerTrie.h.

Member Function Documentation

◆ ancestor()

template<class Ledger>
ID xrpl::SpanTip< Ledger >::ancestor ( Seq const & s) const
nodiscard

Lookup the ID of an ancestor of the tip ledger.

Parameters
sThe sequence number of the ancestor
Returns
The ID of the ancestor with that sequence number
Note
s must be less than or equal to the sequence number of the tip ledger

Definition at line 45 of file LedgerTrie.h.

Member Data Documentation

◆ seq

template<class Ledger>
Seq xrpl::SpanTip< Ledger >::seq

Definition at line 32 of file LedgerTrie.h.

◆ id

template<class Ledger>
ID xrpl::SpanTip< Ledger >::id

Definition at line 34 of file LedgerTrie.h.

◆ ledger_

template<class Ledger>
Ledger const xrpl::SpanTip< Ledger >::ledger_
private

Definition at line 52 of file LedgerTrie.h.