1#ifndef XRPL_TX_APPLYSTEPS_H_INCLUDED
2#define XRPL_TX_APPLYSTEPS_H_INCLUDED
4#include <xrpl/beast/utility/Journal.h>
5#include <xrpl/ledger/ApplyViewImpl.h>
163 template <
class Context>
211 template <
class Context>
A generic endpoint for log messages.
Writable ledger view that accumulates state and tx changes.
Rules controlling protocol behavior.
A type that represents either a sequence value or a ticket value.
SeqProxy & advanceBy(std::uint32_t amount)
Class describing the consequences to the account of applying a transaction if the transaction consume...
XRPAmount fee_
Transaction fee.
std::uint32_t sequencesConsumed() const
Sequences consumed.
TxConsequences(TxConsequences &&)=default
Move constructor.
TxConsequences & operator=(TxConsequences &&)=default
Move assignment operator.
TxConsequences(TxConsequences const &)=default
Copy constructor.
SeqProxy followingSeq() const
std::uint32_t sequencesConsumed_
Number of sequences consumed.
XRPAmount const & potentialSpend() const
Potential Spend.
SeqProxy seqProxy() const
SeqProxy.
XRPAmount fee() const
Fee.
bool isBlocker_
Describes how the transaction affects subsequent transactions.
TxConsequences & operator=(TxConsequences const &)=default
Copy assignment operator.
bool isBlocker() const
Returns true if the transaction is a blocker.
Category
Describes how the transaction affects subsequent transactions.
@ normal
Moves currency around, creates offers, etc.
@ blocker
Affects the ability of subsequent transactions to claim a fee.
XRPAmount potentialSpend_
Does NOT include the fee.
SeqProxy seqProx_
SeqProxy of transaction.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
PreflightResult preflight(Application &app, Rules const &rules, STTx const &tx, ApplyFlags flags, beast::Journal j)
Gate a transaction based on static information.
ApplyResult doApply(PreclaimResult const &preclaimResult, Application &app, OpenView &view)
Apply a prechecked transaction to an OpenView.
XRPAmount calculateBaseFee(ReadView const &view, STTx const &tx)
Compute only the expected base fee for a transaction.
PreclaimResult preclaim(PreflightResult const &preflightResult, Application &app, OpenView const &view)
Gate a transaction based on static ledger information.
bool isTecClaimHardFail(TER ter, ApplyFlags flags)
Return true if the transaction can claim a fee (tec), and the ApplyFlags do not allow soft failures.
bool isTecClaim(TER x) noexcept
XRPAmount calculateDefaultBaseFee(ReadView const &view, STTx const &tx)
Return the minimum fee that an "ordinary" transaction would pay.
ApplyResult(TER t, bool a, std::optional< TxMeta > m=std::nullopt)
std::optional< TxMeta > metadata
Describes the results of the preclaim check.
ApplyFlags const flags
From the input - the flags.
TER const ter
Intermediate transaction result.
PreclaimResult & operator=(PreclaimResult const &)=delete
Deleted copy assignment operator.
bool const likelyToClaimFee
Success flag - whether the transaction is likely to claim a fee.
ReadView const & view
From the input - the ledger view.
PreclaimResult(Context const &ctx_, TER ter_)
Constructor.
beast::Journal const j
From the input - the journal.
PreclaimResult(PreclaimResult const &)=default
std::optional< uint256 const > const parentBatchId
From the input - the batch identifier, if part of a batch.
STTx const & tx
From the input - the transaction.
Describes the results of the preflight check.
Rules const rules
From the input - the rules.
PreflightResult & operator=(PreflightResult const &)=delete
Deleted copy assignment operator.
ApplyFlags const flags
From the input - the flags.
PreflightResult(PreflightResult const &)=default
beast::Journal const j
From the input - the journal.
NotTEC const ter
Intermediate transaction result.
PreflightResult(Context const &ctx_, std::pair< NotTEC, TxConsequences > const &result)
Constructor.
std::optional< uint256 const > const parentBatchId
From the input - the batch identifier, if part of a batch.
TxConsequences const consequences
Consequences of the transaction.
STTx const & tx
From the input - the transaction.