xrpld
Loading...
Searching...
No Matches
Change.h
1#pragma once
2
3#include <xrpl/tx/Transactor.h>
4
5namespace xrpl {
6
7class Change : public Transactor
8{
9public:
11
12 explicit Change(ApplyContext& ctx) : Transactor(ctx)
13 {
14 }
15
16 TER
17 doApply() override;
18 void
19 preCompute() override;
20
21 void
22 visitInvariantEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after) override;
23
24 [[nodiscard]] bool
26 STTx const& tx,
27 TER result,
28 XRPAmount fee,
29 ReadView const& view,
30 beast::Journal const& j) override;
31
32 static XRPAmount
34 {
35 return XRPAmount{0};
36 }
37
38 static TER
39 preclaim(PreclaimContext const& ctx);
40
41private:
42 TER
44
45 TER
46 applyFee();
47
48 TER
50};
51
53using SetFee = Change;
55
56} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:38
State information when applying a tx.
void visitInvariantEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after) override
Inspect a single ledger entry modified by this transaction.
Definition Change.cpp:412
Change(ApplyContext &ctx)
Definition Change.h:12
bool finalizeInvariants(STTx const &tx, TER result, XRPAmount fee, ReadView const &view, beast::Journal const &j) override
Check transaction-specific post-conditions after all entries have been visited.
Definition Change.cpp:418
static XRPAmount calculateBaseFee(ReadView const &view, STTx const &tx)
Definition Change.h:33
static TER preclaim(PreclaimContext const &ctx)
Definition Change.cpp:76
TER applyUNLModify()
Definition Change.cpp:295
TER doApply() override
Definition Change.cpp:136
TER applyAmendment()
Definition Change.cpp:161
void preCompute() override
Definition Change.cpp:155
TER applyFee()
Definition Change.cpp:255
static constexpr auto kConsequencesFactory
Definition Change.h:10
A view into a ledger.
Definition ReadView.h:31
std::shared_ptr< STLedgerEntry const > const & const_ref
ApplyView & view()
Definition Transactor.h:136
Transactor(Transactor const &)=delete
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
Definition View.cpp:554
Change SetFee
Definition Change.h:53
TERSubset< CanCvtToTER > TER
Definition TER.h:634
Change EnableAmendment
Definition Change.h:52
Change UNLModify
Definition Change.h:54
State information when determining if a tx is likely to claim a fee.
Definition Transactor.h:61