20#ifndef RIPPLE_APP_TX_TRANSACTOR_H_INCLUDED
21#define RIPPLE_APP_TX_TRANSACTOR_H_INCLUDED
23#include <xrpld/app/tx/applySteps.h>
24#include <xrpld/app/tx/detail/ApplyContext.h>
26#include <xrpl/beast/utility/Journal.h>
27#include <xrpl/beast/utility/WrappedSink.h>
28#include <xrpl/protocol/Permissions.h>
29#include <xrpl/protocol/XRPAmount.h>
71 (flags_ &
tapBATCH) == 0,
"Batch apply flag should not be set");
108 "Parent Batch ID should be set if batch apply flag is set");
114 TER preflightResult_,
128 (flags_ &
tapBATCH) == 0,
"Batch apply flag should not be set");
A generic endpoint for log messages.
static Sink & getNullSink()
Returns a Sink which does nothing.
Wraps a Journal::Sink to prefix its output with a string.
State information when applying a tx.
Writeable view to a ledger, for applying a transaction.
Rules controlling protocol behavior.
TER consumeSeqProxy(SLE::pointer const &sleAccount)
ApplyResult operator()()
Process the transaction.
Transactor & operator=(Transactor const &)=delete
static NotTEC checkPriorTxAndLastLedger(PreclaimContext const &ctx)
static TER checkFee(PreclaimContext const &ctx, XRPAmount baseFee)
static XRPAmount calculateBaseFee(ReadView const &view, STTx const &tx)
static NotTEC checkSeqProxy(ReadView const &view, STTx const &tx, beast::Journal j)
static NotTEC checkSign(PreclaimContext const &ctx)
void trapTransaction(uint256) const
static XRPAmount minimumFee(Application &app, XRPAmount baseFee, Fees const &fees, ApplyFlags flags)
Compute the minimum fee required to process a transaction with a given baseFee based on the current s...
virtual ~Transactor()=default
static NotTEC checkSingleSign(AccountID const &idSigner, AccountID const &idAccount, std::shared_ptr< SLE const > sleAccount, Rules const &rules, beast::Journal j)
static NotTEC checkMultiSign(ReadView const &view, AccountID const &idAccount, STArray const &txSigners, ApplyFlags const &flags, beast::Journal j)
static TER checkPermission(ReadView const &view, STTx const &tx)
static TER preclaim(PreclaimContext const &ctx)
static NotTEC checkBatchSign(PreclaimContext const &ctx)
virtual void preCompute()
static TER ticketDelete(ApplyView &view, AccountID const &account, uint256 const &ticketIndex, beast::Journal j)
std::pair< TER, XRPAmount > reset(XRPAmount fee)
Reset the context, discarding any changes made and adjust the fee.
Transactor(Transactor const &)=delete
ApplyView const & view() const
Class describing the consequences to the account of applying a transaction if the transaction consume...
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
NotTEC preflight0(PreflightContext const &ctx)
Performs early sanity checks on the txid.
NotTEC preflight1(PreflightContext const &ctx)
Performs early sanity checks on the account and fee fields.
NotTEC preflight2(PreflightContext const &ctx)
Checks whether the signature appears valid.
Reflects the fee settings for a particular ledger.
State information when determining if a tx is likely to claim a fee.
PreclaimContext & operator=(PreclaimContext const &)=delete
PreclaimContext(Application &app_, ReadView const &view_, TER preflightResult_, STTx const &tx_, ApplyFlags flags_, beast::Journal j_=beast::Journal{beast::Journal::getNullSink()})
PreclaimContext(Application &app_, ReadView const &view_, TER preflightResult_, STTx const &tx_, ApplyFlags flags_, std::optional< uint256 > parentBatchId_, beast::Journal j_=beast::Journal{beast::Journal::getNullSink()})
std::optional< uint256 const > const parentBatchId
State information when preflighting a tx.
PreflightContext(Application &app_, STTx const &tx_, uint256 parentBatchId_, Rules const &rules_, ApplyFlags flags_, beast::Journal j_=beast::Journal{beast::Journal::getNullSink()})
std::optional< uint256 const > parentBatchId
PreflightContext(Application &app_, STTx const &tx_, Rules const &rules_, ApplyFlags flags_, beast::Journal j_=beast::Journal{beast::Journal::getNullSink()})
PreflightContext & operator=(PreflightContext const &)=delete
Describes the results of the preflight check.