20#include <xrpld/app/misc/HashRouter.h> 
   21#include <xrpld/app/tx/apply.h> 
   22#include <xrpld/app/tx/applySteps.h> 
   24#include <xrpl/basics/Log.h> 
   25#include <xrpl/protocol/Feature.h> 
   26#include <xrpl/protocol/TxFlags.h> 
   51    auto const flags = router.
getFlags(
id);
 
   61                "Malformed: Invalid inner batch transaction."};
 
   81        auto const requireCanonicalSig =
 
   82            rules.
enabled(featureRequireFullyCanonicalSig)
 
   86        auto const sigVerify = tx.
checkSign(requireCanonicalSig, rules);
 
 
  137template <
typename PreflightChecks>
 
  153    return apply(app, view, [&]() 
mutable {
 
 
  167    return apply(app, view, [&]() 
mutable {
 
 
  176    STTx const& batchTxn,
 
  182        "Batch transaction missing sfRawTransactions");
 
  185    auto const mode = batchTxn.
getFlags();
 
  187    auto applyOneTransaction =
 
  188        [&app, &j, &parentBatchId, &batchView](
STTx&& tx) {
 
  195                "Inner transaction should not be applied");
 
  197            JLOG(j.
debug()) << 
"BatchTrace[" << parentBatchId
 
  198                            << 
"]: " << tx.getTransactionID() << 
" " 
  199                            << (ret.applied ? 
"applied" : 
"failure") << 
": " 
  205                perTxBatchView.
apply(batchView);
 
  214        auto const result = applyOneTransaction(
STTx{std::move(rb)});
 
  218            "Outer Batch failure, inner transaction should not be applied");
 
 
  252                    << (retryAssured ? 
"/retry" : 
"/final");
 
  256        auto const result = 
apply(app, view, txn, flags, j);
 
  261                << 
"Transaction applied: " << 
transToken(result.ter);
 
  270                    wholeBatchView.
apply(view);
 
  281                << 
"Transaction failure: " << 
transHuman(result.ter);
 
  290        JLOG(j.
warn()) << 
"Throws: " << ex.
what();
 
 
A generic endpoint for log messages.
 
Routing table for objects identified by hash.
 
HashRouterFlags getFlags(uint256 const &key)
 
bool setFlags(uint256 const &key, HashRouterFlags flags)
Set the flags on a hash.
 
RAII class to set and restore the Number switchover.
 
Writable ledger view that accumulates state and tx changes.
 
Rules const & rules() const override
Returns the tx processing rules.
 
void apply(TxsRawView &to) const
Apply changes.
 
Rules controlling protocol behavior.
 
bool enabled(uint256 const &feature) const
Returns true if a feature is enabled.
 
STArray const & getFieldArray(SField const &field) const
 
bool isFlag(std::uint32_t) const
 
bool isFieldPresent(SField const &field) const
 
std::uint32_t getFlags() const
 
Blob getSigningPubKey() const
 
Expected< void, std::string > checkSign(RequireFullyCanonicalSig requireCanonicalSig, Rules const &rules) const
Check the signature.
 
TxType getTxnType() const
 
uint256 getTransactionID() const
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
std::string transHuman(TER code)
 
constexpr std::uint32_t tfAllOrNothing
 
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.
 
constexpr std::uint32_t tfOnlyOne
 
constexpr struct ripple::batch_view_t batch_view
 
ApplyTransactionResult
Enum class for return value from applyTransaction
 
@ Success
Applied to this ledger.
 
@ Retry
Should be retried in this ledger.
 
@ Fail
Should not be retried in this ledger.
 
constexpr HashRouterFlags SF_SIGGOOD
 
PreclaimResult preclaim(PreflightResult const &preflightResult, Application &app, OpenView const &view)
Gate a transaction based on static ledger information.
 
bool isTefFailure(TER x) noexcept
 
constexpr std::uint32_t tfUntilFailure
 
std::string transToken(TER code)
 
static bool applyBatchTransactions(Application &app, OpenView &batchView, STTx const &batchTxn, beast::Journal j)
 
constexpr HashRouterFlags SF_LOCALBAD
 
constexpr HashRouterFlags SF_SIGBAD
 
bool isTesSuccess(TER x) noexcept
 
ApplyResult apply(Application &app, OpenView &view, STTx const &tx, ApplyFlags flags, beast::Journal journal)
Apply a transaction to an OpenView.
 
void forceValidity(HashRouter &router, uint256 const &txid, Validity validity)
Sets the validity of a given transaction in the cache.
 
bool passesLocalChecks(STObject const &st, std::string &)
 
Validity
Describes the pre-processing validity of a transaction.
 
@ SigBad
Signature is bad. Didn't do local checks.
 
@ Valid
Signature and local checks are good / passed.
 
@ SigGoodOnly
Signature is good, but local checks fail.
 
bool isTemMalformed(TER x) noexcept
 
ApplyTransactionResult applyTransaction(Application &app, OpenView &view, STTx const &tx, bool retryAssured, ApplyFlags flags, beast::Journal journal)
Transaction application helper.
 
std::pair< Validity, std::string > checkValidity(HashRouter &router, STTx const &tx, Rules const &rules, Config const &config)
Checks transaction signature and local checks.
 
bool isTecClaim(TER x) noexcept
 
bool isTelLocal(TER x) noexcept
 
constexpr std::uint32_t tfInnerBatchTxn
 
constexpr HashRouterFlags SF_LOCALGOOD