rippled
Loading...
Searching...
No Matches
apply.h
1#ifndef XRPL_TX_APPLY_H_INCLUDED
2#define XRPL_TX_APPLY_H_INCLUDED
3
4#include <xrpld/app/tx/applySteps.h>
5#include <xrpld/core/Config.h>
6
7#include <xrpl/beast/utility/Journal.h>
8#include <xrpl/ledger/View.h>
9#include <xrpl/protocol/STTx.h>
10
11#include <utility>
12
13namespace ripple {
14
15class Application;
16class HashRouter;
17
22enum class Validity {
24 SigBad,
28 Valid
29};
30
46 HashRouter& router,
47 STTx const& tx,
48 Rules const& rules,
49 Config const& config);
50
60void
61forceValidity(HashRouter& router, uint256 const& txid, Validity validity);
62
104ApplyResult
105apply(
106 Application& app,
107 OpenView& view,
108 STTx const& tx,
109 ApplyFlags flags,
110 beast::Journal journal);
111
118 Success,
120 Fail,
122 Retry
123};
124
134 Application& app,
135 OpenView& view,
136 STTx const& tx,
137 bool retryAssured,
138 ApplyFlags flags,
139 beast::Journal journal);
140
141} // namespace ripple
142
143#endif
A generic endpoint for log messages.
Definition Journal.h:41
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
ApplyTransactionResult
Enum class for return value from applyTransaction
Definition apply.h:116
@ 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:539
ApplyResult apply(Application &app, OpenView &view, STTx const &tx, ApplyFlags flags, beast::Journal journal)
Apply a transaction to an OpenView.
Definition apply.cpp:127
void forceValidity(HashRouter &router, uint256 const &txid, Validity validity)
Sets the validity of a given transaction in the cache.
Definition apply.cpp:99
Validity
Describes the pre-processing validity of a transaction.
Definition apply.h:22
@ 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.
ApplyTransactionResult applyTransaction(Application &app, OpenView &view, STTx const &tx, bool retryAssured, ApplyFlags flags, beast::Journal journal)
Transaction application helper.
Definition apply.cpp:220
std::pair< Validity, std::string > checkValidity(HashRouter &router, STTx const &tx, Rules const &rules, Config const &config)
Checks transaction signature and local checks.
Definition apply.cpp:25