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

Class describing the consequences to the account of applying a transaction if the transaction consumes the maximum XRP allowed. More...

#include <applySteps.h>

Collaboration diagram for xrpl::TxConsequences:

Public Types

enum class  Category { Normal = 0 , Blocker }
 Describes how the transaction affects subsequent transactions. More...

Public Member Functions

 TxConsequences (NotTEC pfResult)
 TxConsequences (STTx const &tx)
 Constructor if the STTx has no notable consequences for the TxQ.
 TxConsequences (STTx const &tx, Category category)
 Constructor for a blocker.
 TxConsequences (STTx const &tx, XRPAmount potentialSpend)
 Constructor for an STTx that may consume more XRP than the fee.
 TxConsequences (STTx const &tx, std::uint32_t sequencesConsumed)
 Constructor for an STTx that consumes more than the usual sequences.
 TxConsequences (TxConsequences const &)=default
 Copy constructor.
TxConsequencesoperator= (TxConsequences const &)=default
 Copy assignment operator.
 TxConsequences (TxConsequences &&)=default
 Move constructor.
TxConsequencesoperator= (TxConsequences &&)=default
 Move assignment operator.
XRPAmount fee () const
 Fee.
XRPAmount const & potentialSpend () const
 Potential Spend.
SeqProxy seqProxy () const
 SeqProxy.
std::uint32_t sequencesConsumed () const
 Sequences consumed.
bool isBlocker () const
 Returns true if the transaction is a blocker.
SeqProxy followingSeq () const

Private Attributes

bool isBlocker_
 Describes how the transaction affects subsequent transactions.
XRPAmount fee_
 Transaction fee.
XRPAmount potentialSpend_
 Does NOT include the fee.
SeqProxy seqProx_
 SeqProxy of transaction.
std::uint32_t sequencesConsumed_
 Number of sequences consumed.

Detailed Description

Class describing the consequences to the account of applying a transaction if the transaction consumes the maximum XRP allowed.

Definition at line 37 of file applySteps.h.

Member Enumeration Documentation

◆ Category

enum class xrpl::TxConsequences::Category
strong

Describes how the transaction affects subsequent transactions.

Enumerator
Normal 

Moves currency around, creates offers, etc.

Blocker 

Affects the ability of subsequent transactions to claim a fee.

Eg. SetRegularKey

Definition at line 42 of file applySteps.h.

Constructor & Destructor Documentation

◆ TxConsequences() [1/7]

xrpl::TxConsequences::TxConsequences ( NotTEC pfResult)
explicit

Definition at line 247 of file applySteps.cpp.

◆ TxConsequences() [2/7]

xrpl::TxConsequences::TxConsequences ( STTx const & tx)
explicit

Constructor if the STTx has no notable consequences for the TxQ.

Definition at line 258 of file applySteps.cpp.

◆ TxConsequences() [3/7]

xrpl::TxConsequences::TxConsequences ( STTx const & tx,
Category category )

Constructor for a blocker.

Definition at line 267 of file applySteps.cpp.

◆ TxConsequences() [4/7]

xrpl::TxConsequences::TxConsequences ( STTx const & tx,
XRPAmount potentialSpend )

Constructor for an STTx that may consume more XRP than the fee.

Definition at line 272 of file applySteps.cpp.

◆ TxConsequences() [5/7]

xrpl::TxConsequences::TxConsequences ( STTx const & tx,
std::uint32_t sequencesConsumed )

Constructor for an STTx that consumes more than the usual sequences.

Definition at line 277 of file applySteps.cpp.

◆ TxConsequences() [6/7]

xrpl::TxConsequences::TxConsequences ( TxConsequences const & )
default

Copy constructor.

◆ TxConsequences() [7/7]

xrpl::TxConsequences::TxConsequences ( TxConsequences && )
default

Move constructor.

Member Function Documentation

◆ operator=() [1/2]

TxConsequences & xrpl::TxConsequences::operator= ( TxConsequences const & )
default

Copy assignment operator.

◆ operator=() [2/2]

TxConsequences & xrpl::TxConsequences::operator= ( TxConsequences && )
default

Move assignment operator.

◆ fee()

XRPAmount xrpl::TxConsequences::fee ( ) const
nodiscard

Fee.

Definition at line 93 of file applySteps.h.

◆ potentialSpend()

XRPAmount const & xrpl::TxConsequences::potentialSpend ( ) const
nodiscard

Potential Spend.

Definition at line 100 of file applySteps.h.

◆ seqProxy()

SeqProxy xrpl::TxConsequences::seqProxy ( ) const
nodiscard

SeqProxy.

Definition at line 107 of file applySteps.h.

◆ sequencesConsumed()

std::uint32_t xrpl::TxConsequences::sequencesConsumed ( ) const
nodiscard

Sequences consumed.

Definition at line 114 of file applySteps.h.

◆ isBlocker()

bool xrpl::TxConsequences::isBlocker ( ) const
nodiscard

Returns true if the transaction is a blocker.

Definition at line 121 of file applySteps.h.

◆ followingSeq()

SeqProxy xrpl::TxConsequences::followingSeq ( ) const
nodiscard

Definition at line 128 of file applySteps.h.

Member Data Documentation

◆ isBlocker_

bool xrpl::TxConsequences::isBlocker_
private

Describes how the transaction affects subsequent transactions.

Definition at line 53 of file applySteps.h.

◆ fee_

XRPAmount xrpl::TxConsequences::fee_
private

Transaction fee.

Definition at line 55 of file applySteps.h.

◆ potentialSpend_

XRPAmount xrpl::TxConsequences::potentialSpend_
private

Does NOT include the fee.

Definition at line 57 of file applySteps.h.

◆ seqProx_

SeqProxy xrpl::TxConsequences::seqProx_
private

SeqProxy of transaction.

Definition at line 59 of file applySteps.h.

◆ sequencesConsumed_

std::uint32_t xrpl::TxConsequences::sequencesConsumed_
private

Number of sequences consumed.

Definition at line 61 of file applySteps.h.