rippled
Loading...
Searching...
No Matches
apply.h
1#pragma once
2
3#include <xrpl/beast/utility/Journal.h>
4#include <xrpl/ledger/View.h>
5#include <xrpl/protocol/STTx.h>
6#include <xrpl/tx/applySteps.h>
7
8#include <utility>
9
10namespace xrpl {
11
12class HashRouter;
13class ServiceRegistry;
14
19enum class Validity {
21 SigBad,
25 Valid
26};
27
42checkValidity(HashRouter& router, STTx const& tx, Rules const& rules);
43
53void
54forceValidity(HashRouter& router, uint256 const& txid, Validity validity);
55
97ApplyResult
98apply(
99 ServiceRegistry& registry,
100 OpenView& view,
101 STTx const& tx,
102 ApplyFlags flags,
103 beast::Journal journal);
104
111 Success,
113 Fail,
115 Retry
116};
117
127 ServiceRegistry& registry,
128 OpenView& view,
129 STTx const& tx,
130 bool retryAssured,
131 ApplyFlags flags,
132 beast::Journal journal);
133
134} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:40
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:19
@ 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.
ApplyResult apply(ServiceRegistry &registry, OpenView &view, STTx const &tx, ApplyFlags flags, beast::Journal journal)
Apply a transaction to an OpenView.
Definition apply.cpp:124
ApplyTransactionResult applyTransaction(ServiceRegistry &registry, OpenView &view, STTx const &tx, bool retryAssured, ApplyFlags flags, beast::Journal journal)
Transaction application helper.
Definition apply.cpp:207
std::pair< Validity, std::string > checkValidity(HashRouter &router, STTx const &tx, Rules const &rules)
Checks transaction signature and local checks.
Definition apply.cpp:21
ApplyTransactionResult
Enum class for return value from applyTransaction
Definition apply.h:109
@ Success
Applied to this ledger.
@ Retry
Should be retried in this ledger.
@ Fail
Should not be retried in this ledger.
base_uint< 256 > uint256
Definition base_uint.h:531
ApplyFlags
Definition ApplyView.h:10
void forceValidity(HashRouter &router, uint256 const &txid, Validity validity)
Sets the validity of a given transaction in the cache.
Definition apply.cpp:96