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

Holds transactions which were deferred to the next pass of consensus. More...

#include <CanonicalTXSet.h>

Inheritance diagram for xrpl::CanonicalTXSet:
Collaboration diagram for xrpl::CanonicalTXSet:

Classes

class  Key

Public Types

using const_iterator = std::map<Key, std::shared_ptr<STTx const>>::const_iterator

Public Member Functions

 CanonicalTXSet (LedgerHash const &saltHash)
void insert (std::shared_ptr< STTx const > txn)
std::shared_ptr< STTx const > popAcctTransaction (std::shared_ptr< STTx const > const &tx)
void reset (LedgerHash const &salt)
const_iterator erase (const_iterator const &it)
const_iterator begin () const
const_iterator end () const
size_t size () const
bool empty () const
uint256 const & key () const

Public Attributes

friend Object

Private Member Functions

uint256 accountKey (AccountID const &account)

Static Private Member Functions

static auto & getCounter () noexcept

Private Attributes

std::map< Key, std::shared_ptr< STTx const > > map_
uint256 salt_

Friends

bool operator< (CanonicalTXSet::Key const &lhs, CanonicalTXSet::Key const &rhs)

Detailed Description

Holds transactions which were deferred to the next pass of consensus.

"Canonical" refers to the order in which transactions are applied.

  • Puts transactions from the same account in SeqProxy order

Definition at line 18 of file CanonicalTXSet.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 88 of file CanonicalTXSet.h.

Constructor & Destructor Documentation

◆ CanonicalTXSet()

xrpl::CanonicalTXSet::CanonicalTXSet ( LedgerHash const & saltHash)
explicit

Definition at line 91 of file CanonicalTXSet.h.

Member Function Documentation

◆ accountKey()

uint256 xrpl::CanonicalTXSet::accountKey ( AccountID const & account)
private

Definition at line 34 of file CanonicalTXSet.cpp.

◆ insert()

void xrpl::CanonicalTXSet::insert ( std::shared_ptr< STTx const > txn)

Definition at line 43 of file CanonicalTXSet.cpp.

◆ popAcctTransaction()

std::shared_ptr< STTx const > xrpl::CanonicalTXSet::popAcctTransaction ( std::shared_ptr< STTx const > const & tx)

Definition at line 51 of file CanonicalTXSet.cpp.

◆ reset()

void xrpl::CanonicalTXSet::reset ( LedgerHash const & salt)

Definition at line 109 of file CanonicalTXSet.h.

◆ erase()

const_iterator xrpl::CanonicalTXSet::erase ( const_iterator const & it)

Definition at line 116 of file CanonicalTXSet.h.

◆ begin()

const_iterator xrpl::CanonicalTXSet::begin ( ) const
nodiscard

Definition at line 122 of file CanonicalTXSet.h.

◆ end()

const_iterator xrpl::CanonicalTXSet::end ( ) const
nodiscard

Definition at line 128 of file CanonicalTXSet.h.

◆ size()

size_t xrpl::CanonicalTXSet::size ( ) const
nodiscard

Definition at line 134 of file CanonicalTXSet.h.

◆ empty()

bool xrpl::CanonicalTXSet::empty ( ) const
nodiscard

Definition at line 139 of file CanonicalTXSet.h.

◆ key()

uint256 const & xrpl::CanonicalTXSet::key ( ) const
nodiscard

Definition at line 145 of file CanonicalTXSet.h.

◆ getCounter()

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

Definition at line 109 of file CountedObject.h.

◆ operator<

bool operator< ( CanonicalTXSet::Key const & lhs,
CanonicalTXSet::Key const & rhs )
friend

Definition at line 15 of file CanonicalTXSet.cpp.

Member Data Documentation

◆ map_

std::map<Key, std::shared_ptr<STTx const> > xrpl::CanonicalTXSet::map_
private

Definition at line 151 of file CanonicalTXSet.h.

◆ salt_

uint256 xrpl::CanonicalTXSet::salt_
private

Definition at line 154 of file CanonicalTXSet.h.

◆ Object

Definition at line 134 of file CountedObject.h.