rippled
Classes | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
ripple::CanonicalTXSet Class Reference

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

Inheritance diagram for ripple::CanonicalTXSet:
Inheritance graph
[legend]
Collaboration diagram for ripple::CanonicalTXSet:
Collaboration graph
[legend]

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 > 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
 

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< (Key const &lhs, 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.

Definition at line 38 of file CanonicalTXSet.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 109 of file CanonicalTXSet.h.

Constructor & Destructor Documentation

◆ CanonicalTXSet()

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

Definition at line 112 of file CanonicalTXSet.h.

Member Function Documentation

◆ accountKey()

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

Definition at line 43 of file CanonicalTXSet.cpp.

◆ insert()

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

Definition at line 52 of file CanonicalTXSet.cpp.

◆ popAcctTransaction()

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

Definition at line 62 of file CanonicalTXSet.cpp.

◆ reset()

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

Definition at line 130 of file CanonicalTXSet.h.

◆ erase()

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

Definition at line 137 of file CanonicalTXSet.h.

◆ begin()

const_iterator ripple::CanonicalTXSet::begin ( ) const

Definition at line 143 of file CanonicalTXSet.h.

◆ end()

const_iterator ripple::CanonicalTXSet::end ( ) const

Definition at line 149 of file CanonicalTXSet.h.

◆ size()

size_t ripple::CanonicalTXSet::size ( ) const

Definition at line 155 of file CanonicalTXSet.h.

◆ empty()

bool ripple::CanonicalTXSet::empty ( ) const

Definition at line 160 of file CanonicalTXSet.h.

◆ key()

uint256 const& ripple::CanonicalTXSet::key ( ) const

Definition at line 166 of file CanonicalTXSet.h.

◆ getCounter()

static auto& ripple::CountedObject< CanonicalTXSet >::getCounter
staticprivatenoexceptinherited

Definition at line 128 of file CountedObject.h.

Friends And Related Function Documentation

◆ operator<

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

Definition at line 25 of file CanonicalTXSet.cpp.

Member Data Documentation

◆ map_

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

Definition at line 172 of file CanonicalTXSet.h.

◆ salt_

uint256 ripple::CanonicalTXSet::salt_
private

Definition at line 175 of file CanonicalTXSet.h.