rippled
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
ripple::SetSignerList Class Reference

See the README.md for an overview of the SetSignerList transaction that this class implements. More...

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

Public Member Functions

 SetSignerList (ApplyContext &ctx)
 
TER doApply () override
 
void preCompute () override
 
std::pair< TER, bool > operator() ()
 Process the transaction. More...
 
ApplyViewview ()
 
ApplyView const & view () const
 

Static Public Member Functions

static bool affectsSubsequentTransactionAuth (STTx const &tx)
 
static NotTEC preflight (PreflightContext const &ctx)
 
static TER removeFromLedger (Application &app, ApplyView &view, AccountID const &account)
 
static NotTEC checkSeq (PreclaimContext const &ctx)
 
static TER checkFee (PreclaimContext const &ctx, FeeUnit64 baseFee)
 
static NotTEC checkSign (PreclaimContext const &ctx)
 
static FeeUnit64 calculateBaseFee (ReadView const &view, STTx const &tx)
 
static XRPAmount calculateFeePaid (STTx const &tx)
 
static XRPAmount calculateMaxSpend (STTx const &tx)
 
static TER preclaim (PreclaimContext const &ctx)
 

Protected Member Functions

TER apply ()
 

Static Protected Member Functions

static XRPAmount minimumFee (Application &app, FeeUnit64 baseFee, Fees const &fees, ApplyFlags flags)
 Compute the minimum fee required to process a transaction with a given baseFee based on the current server load. More...
 

Protected Attributes

ApplyContextctx_
 
const beast::Journal j_
 
AccountID account_
 
XRPAmount mPriorBalance
 
XRPAmount mSourceBalance
 

Private Types

enum  Operation { unknown, set, destroy }
 

Private Member Functions

TER replaceSignerList ()
 
TER destroySignerList ()
 
void writeSignersToSLE (SLE::pointer const &ledgerEntry, std::uint32_t flags) const
 
XRPAmount reset (XRPAmount fee)
 Reset the context, discarding any changes made and adjust the fee. More...
 
void setSeq ()
 
TER payFee ()
 

Static Private Member Functions

static std::tuple< NotTEC, std::uint32_t, std::vector< SignerEntries::SignerEntry >, OperationdetermineOperation (STTx const &tx, ApplyFlags flags, beast::Journal j)
 
static NotTEC validateQuorumAndSignerEntries (std::uint32_t quorum, std::vector< SignerEntries::SignerEntry > const &signers, AccountID const &account, beast::Journal j)
 
static NotTEC checkSingleSign (PreclaimContext const &ctx)
 
static NotTEC checkMultiSign (PreclaimContext const &ctx)
 

Private Attributes

Operation do_ {unknown}
 
std::uint32_t quorum_ {0}
 
std::vector< SignerEntries::SignerEntrysigners_
 

Detailed Description

See the README.md for an overview of the SetSignerList transaction that this class implements.

Definition at line 41 of file SetSignerList.h.

Member Enumeration Documentation

◆ Operation

Enumerator
unknown 
set 
destroy 

Definition at line 45 of file SetSignerList.h.

Constructor & Destructor Documentation

◆ SetSignerList()

ripple::SetSignerList::SetSignerList ( ApplyContext ctx)
explicit

Definition at line 51 of file SetSignerList.h.

Member Function Documentation

◆ affectsSubsequentTransactionAuth()

static bool ripple::SetSignerList::affectsSubsequentTransactionAuth ( STTx const &  tx)
static

Definition at line 56 of file SetSignerList.h.

◆ preflight()

NotTEC ripple::SetSignerList::preflight ( PreflightContext const &  ctx)
static

Definition at line 79 of file SetSignerList.cpp.

◆ doApply()

TER ripple::SetSignerList::doApply ( )
overridevirtual

Implements ripple::Transactor.

Definition at line 113 of file SetSignerList.cpp.

◆ preCompute()

void ripple::SetSignerList::preCompute ( )
overridevirtual

Reimplemented from ripple::Transactor.

Definition at line 132 of file SetSignerList.cpp.

◆ removeFromLedger()

TER ripple::SetSignerList::removeFromLedger ( Application app,
ApplyView view,
AccountID const &  account 
)
static

Definition at line 221 of file SetSignerList.cpp.

◆ determineOperation()

std::tuple< NotTEC, std::uint32_t, std::vector< SignerEntries::SignerEntry >, SetSignerList::Operation > ripple::SetSignerList::determineOperation ( STTx const &  tx,
ApplyFlags  flags,
beast::Journal  j 
)
staticprivate

Definition at line 45 of file SetSignerList.cpp.

◆ validateQuorumAndSignerEntries()

NotTEC ripple::SetSignerList::validateQuorumAndSignerEntries ( std::uint32_t  quorum,
std::vector< SignerEntries::SignerEntry > const &  signers,
AccountID const &  account,
beast::Journal  j 
)
staticprivate

Definition at line 235 of file SetSignerList.cpp.

◆ replaceSignerList()

TER ripple::SetSignerList::replaceSignerList ( )
private

Definition at line 292 of file SetSignerList.cpp.

◆ destroySignerList()

TER ripple::SetSignerList::destroySignerList ( )
private

Definition at line 360 of file SetSignerList.cpp.

◆ writeSignersToSLE()

void ripple::SetSignerList::writeSignersToSLE ( SLE::pointer const &  ledgerEntry,
std::uint32_t  flags 
) const
private

Definition at line 380 of file SetSignerList.cpp.

◆ operator()()

std::pair< TER, bool > ripple::Transactor::operator() ( )
inherited

Process the transaction.

Definition at line 627 of file Transactor.cpp.

◆ view() [1/2]

ApplyView& ripple::Transactor::view ( )
inherited

Definition at line 107 of file Transactor.h.

◆ view() [2/2]

ApplyView const& ripple::Transactor::view ( ) const
inherited

Definition at line 113 of file Transactor.h.

◆ checkSeq()

NotTEC ripple::Transactor::checkSeq ( PreclaimContext const &  ctx)
staticinherited

Definition at line 227 of file Transactor.cpp.

◆ checkFee()

TER ripple::Transactor::checkFee ( PreclaimContext const &  ctx,
FeeUnit64  baseFee 
)
staticinherited

Definition at line 161 of file Transactor.cpp.

◆ checkSign()

NotTEC ripple::Transactor::checkSign ( PreclaimContext const &  ctx)
staticinherited

Definition at line 329 of file Transactor.cpp.

◆ calculateBaseFee()

FeeUnit64 ripple::Transactor::calculateBaseFee ( ReadView const &  view,
STTx const &  tx 
)
staticinherited

Definition at line 121 of file Transactor.cpp.

◆ calculateFeePaid()

XRPAmount ripple::Transactor::calculateFeePaid ( STTx const &  tx)
staticinherited

Definition at line 139 of file Transactor.cpp.

◆ calculateMaxSpend()

XRPAmount ripple::Transactor::calculateMaxSpend ( STTx const &  tx)
staticinherited

Definition at line 155 of file Transactor.cpp.

◆ preclaim()

static TER ripple::Transactor::preclaim ( PreclaimContext const &  ctx)
staticinherited

Definition at line 154 of file Transactor.h.

◆ apply()

TER ripple::Transactor::apply ( )
protectedinherited

Definition at line 298 of file Transactor.cpp.

◆ minimumFee()

XRPAmount ripple::Transactor::minimumFee ( Application app,
FeeUnit64  baseFee,
Fees const &  fees,
ApplyFlags  flags 
)
staticprotectedinherited

Compute the minimum fee required to process a transaction with a given baseFee based on the current server load.

Parameters
appThe application hosting the server
baseFeeThe base fee of a candidate transaction
See also
ripple::calculateBaseFee
Parameters
feesFee settings from the current ledger
flagsTransaction processing fees

Definition at line 145 of file Transactor.cpp.

◆ reset()

XRPAmount ripple::Transactor::reset ( XRPAmount  fee)
privateinherited

Reset the context, discarding any changes made and adjust the fee.

Definition at line 594 of file Transactor.cpp.

◆ setSeq()

void ripple::Transactor::setSeq ( )
privateinherited

Definition at line 275 of file Transactor.cpp.

◆ payFee()

TER ripple::Transactor::payFee ( )
privateinherited

Definition at line 207 of file Transactor.cpp.

◆ checkSingleSign()

NotTEC ripple::Transactor::checkSingleSign ( PreclaimContext const &  ctx)
staticprivateinherited

Definition at line 339 of file Transactor.cpp.

◆ checkMultiSign()

NotTEC ripple::Transactor::checkMultiSign ( PreclaimContext const &  ctx)
staticprivateinherited

Definition at line 413 of file Transactor.cpp.

Member Data Documentation

◆ do_

Operation ripple::SetSignerList::do_ {unknown}
private

Definition at line 46 of file SetSignerList.h.

◆ quorum_

std::uint32_t ripple::SetSignerList::quorum_ {0}
private

Definition at line 47 of file SetSignerList.h.

◆ signers_

std::vector<SignerEntries::SignerEntry> ripple::SetSignerList::signers_
private

Definition at line 48 of file SetSignerList.h.

◆ ctx_

ApplyContext& ripple::Transactor::ctx_
protectedinherited

Definition at line 89 of file Transactor.h.

◆ j_

const beast::Journal ripple::Transactor::j_
protectedinherited

Definition at line 90 of file Transactor.h.

◆ account_

AccountID ripple::Transactor::account_
protectedinherited

Definition at line 92 of file Transactor.h.

◆ mPriorBalance

XRPAmount ripple::Transactor::mPriorBalance
protectedinherited

Definition at line 93 of file Transactor.h.

◆ mSourceBalance

XRPAmount ripple::Transactor::mSourceBalance
protectedinherited

Definition at line 94 of file Transactor.h.