rippled
Loading...
Searching...
No Matches
apply.h
1#pragma once
2
3#include <xrpld/app/tx/applySteps.h>
4#include <xrpld/core/Config.h>
5
6#include <xrpl/beast/utility/Journal.h>
7#include <xrpl/ledger/View.h>
8#include <xrpl/protocol/STTx.h>
9
10#include <utility>
11
12namespace xrpl {
13
14class Application;
15class HashRouter;
16
21enum class Validity {
23 SigBad,
27 Valid
28};
29
44checkValidity(HashRouter& router, STTx const& tx, Rules const& rules, Config const& config);
45
55void
56forceValidity(HashRouter& router, uint256 const& txid, Validity validity);
57
99ApplyResult
100apply(Application& app, OpenView& view, STTx const& tx, ApplyFlags flags, beast::Journal journal);
101
108 Success,
110 Fail,
112 Retry
113};
114
124 Application& app,
125 OpenView& view,
126 STTx const& tx,
127 bool retryAssured,
128 ApplyFlags flags,
129 beast::Journal journal);
130
131} // 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
ApplyResult apply(Application &app, OpenView &view, STTx const &tx, ApplyFlags flags, beast::Journal journal)
Apply a transaction to an OpenView.
Definition apply.cpp:118
Validity
Describes the pre-processing validity of a transaction.
Definition apply.h:21
@ 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:191
ApplyTransactionResult
Enum class for return value from applyTransaction
Definition apply.h:106
@ 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:526
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:22
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:90