rippled
Loading...
Searching...
No Matches
src/xrpld/app/tx/detail/Batch.h
1#ifndef XRPL_TX_BATCH_H_INCLUDED
2#define XRPL_TX_BATCH_H_INCLUDED
3
4#include <xrpld/app/tx/detail/Transactor.h>
5#include <xrpld/core/Config.h>
6
7#include <xrpl/basics/Log.h>
8#include <xrpl/protocol/Indexes.h>
9
10namespace xrpl {
11
12class Batch : public Transactor
13{
14public:
16
17 explicit Batch(ApplyContext& ctx) : Transactor(ctx)
18 {
19 }
20
21 static XRPAmount
22 calculateBaseFee(ReadView const& view, STTx const& tx);
23
24 static std::uint32_t
26
27 static NotTEC
28 preflight(PreflightContext const& ctx);
29
30 static NotTEC
32
33 static NotTEC
34 checkSign(PreclaimContext const& ctx);
35
36 TER
37 doApply() override;
38
39 static constexpr auto disabledTxTypes = std::to_array<TxType>({
40 ttVAULT_CREATE,
41 ttVAULT_SET,
42 ttVAULT_DELETE,
43 ttVAULT_DEPOSIT,
44 ttVAULT_WITHDRAW,
45 ttVAULT_CLAWBACK,
46 ttLOAN_BROKER_SET,
47 ttLOAN_BROKER_DELETE,
48 ttLOAN_BROKER_COVER_DEPOSIT,
49 ttLOAN_BROKER_COVER_WITHDRAW,
50 ttLOAN_BROKER_COVER_CLAWBACK,
51 ttLOAN_SET,
52 ttLOAN_DELETE,
53 ttLOAN_MANAGE,
54 ttLOAN_PAY,
55 });
56};
57
58} // namespace xrpl
59
60#endif
State information when applying a tx.
Batch(ApplyContext &ctx)
static constexpr auto disabledTxTypes
static XRPAmount calculateBaseFee(ReadView const &view, STTx const &tx)
Calculates the total base fee for a batch transaction.
Definition Batch.cpp:35
static NotTEC preflight(PreflightContext const &ctx)
Performs preflight validation checks for a Batch transaction.
Definition Batch.cpp:188
static NotTEC checkSign(PreclaimContext const &ctx)
Checks the validity of signatures for a batch transaction.
Definition Batch.cpp:497
TER doApply() override
Applies the outer batch transaction.
Definition Batch.cpp:519
static constexpr ConsequencesFactoryType ConsequencesFactory
static std::uint32_t getFlagsMask(PreflightContext const &ctx)
Definition Batch.cpp:149
static NotTEC preflightSigValidated(PreflightContext const &ctx)
Definition Batch.cpp:387
A view into a ledger.
Definition ReadView.h:32
ApplyView & view()
Definition Transactor.h:144
T is_same_v
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
State information when determining if a tx is likely to claim a fee.
Definition Transactor.h:61
State information when preflighting a tx.
Definition Transactor.h:16