xrpld
Loading...
Searching...
No Matches
apply.h
1#pragma once
2
3#include <xrpl/basics/base_uint.h>
4#include <xrpl/beast/utility/Journal.h>
5#include <xrpl/ledger/ApplyView.h>
6#include <xrpl/ledger/OpenView.h>
7#include <xrpl/protocol/Rules.h>
8#include <xrpl/protocol/STTx.h>
9#include <xrpl/tx/applySteps.h>
10
11#include <string>
12#include <utility>
13
14namespace xrpl {
15
16class HashRouter;
17class ServiceRegistry;
18
38
54checkValidity(HashRouter& router, STTx const& tx, Rules const& rules);
55
66void
67forceValidity(HashRouter& router, uint256 const& txid, Validity validity);
68
111ApplyResult
112apply(
113 ServiceRegistry& registry,
114 OpenView& view,
115 STTx const& tx,
116 ApplyFlags flags,
117 beast::Journal journal);
118
138
149 ServiceRegistry& registry,
150 OpenView& view,
151 STTx const& tx,
152 bool retryAssured,
153 ApplyFlags flags,
154 beast::Journal journal);
155
156} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:44
Routing table for objects identified by hash.
Definition HashRouter.h:86
Service registry for dependency injection.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
Validity
Describes the pre-processing validity of a transaction.
Definition apply.h:24
@ SigBad
Signature is bad.
Definition apply.h:28
@ Valid
Signature and local checks are good / passed.
Definition apply.h:36
@ SigGoodOnly
Signature is good, but local checks fail.
Definition apply.h:32
ApplyResult apply(ServiceRegistry &registry, OpenView &view, STTx const &tx, ApplyFlags flags, beast::Journal journal)
Apply a transaction to an OpenView.
Definition apply.cpp:122
ApplyTransactionResult applyTransaction(ServiceRegistry &registry, OpenView &view, STTx const &tx, bool retryAssured, ApplyFlags flags, beast::Journal journal)
Transaction application helper.
Definition apply.cpp:208
std::pair< Validity, std::string > checkValidity(HashRouter &router, STTx const &tx, Rules const &rules)
Checks transaction signature and local checks.
Definition apply.cpp:36
ApplyTransactionResult
Enum class for return value from applyTransaction.
Definition apply.h:124
@ Retry
Should be retried in this ledger.
Definition apply.h:136
@ Fail
Should not be retried in this ledger.
Definition apply.h:132
ApplyFlags
Definition ApplyView.h:27
void forceValidity(HashRouter &router, uint256 const &txid, Validity validity)
Sets the validity of a given transaction in the cache.
Definition apply.cpp:95
BaseUInt< 256 > uint256
Definition base_uint.h:580