xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
tx
transactors
delegate
tx/transactors/delegate/DelegateSet.h
1
#pragma once
2
3
#include <xrpl/beast/utility/Journal.h>
4
#include <xrpl/core/ServiceRegistry.h>
5
#include <xrpl/ledger/ApplyView.h>
6
#include <xrpl/ledger/ReadView.h>
7
#include <xrpl/protocol/STTx.h>
8
#include <xrpl/protocol/TER.h>
9
#include <xrpl/protocol/XRPAmount.h>
10
#include <xrpl/tx/ApplyContext.h>
11
#include <xrpl/tx/Transactor.h>
12
13
namespace
xrpl
{
14
15
class
DelegateSet
:
public
Transactor
16
{
17
public
:
18
static
constexpr
auto
kConsequencesFactory
=
ConsequencesFactoryType::Normal
;
19
20
explicit
DelegateSet
(
ApplyContext
& ctx) :
Transactor
(ctx)
21
{
22
}
23
24
static
NotTEC
25
preflight
(
PreflightContext
const
& ctx);
26
27
static
TER
28
preclaim
(
PreclaimContext
const
& ctx);
29
30
TER
31
doApply
()
override
;
32
33
void
34
visitInvariantEntry
(
bool
isDelete,
SLE::ConstRef
before,
SLE::ConstRef
after
)
override
;
35
36
[[nodiscard]]
bool
37
finalizeInvariants
(
38
STTx
const
& tx,
39
TER
result,
40
XRPAmount
fee,
41
ReadView
const
&
view
,
42
beast::Journal
const
& j)
override
;
43
44
// Interface used by AccountDelete
45
static
TER
46
deleteDelegate
(
ApplyView
&
view
,
SLE::Ref
sle,
beast::Journal
j);
47
};
48
49
}
// namespace xrpl
beast::Journal
A generic endpoint for log messages.
Definition
Journal.h:44
xrpl::ApplyContext
State information when applying a tx.
Definition
ApplyContext.h:28
xrpl::ApplyView
Writeable view to a ledger, for applying a transaction.
Definition
ApplyView.h:141
xrpl::DelegateSet::DelegateSet
DelegateSet(ApplyContext &ctx)
Definition
tx/transactors/delegate/DelegateSet.h:20
xrpl::DelegateSet::preflight
static NotTEC preflight(PreflightContext const &ctx)
Definition
DelegateSet.cpp:25
xrpl::DelegateSet::finalizeInvariants
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
DelegateSet.cpp:191
xrpl::DelegateSet::kConsequencesFactory
static constexpr auto kConsequencesFactory
Definition
tx/transactors/delegate/DelegateSet.h:18
xrpl::DelegateSet::visitInvariantEntry
void visitInvariantEntry(bool isDelete, SLE::ConstRef before, SLE::ConstRef after) override
Inspect a single ledger entry modified by this transaction.
Definition
DelegateSet.cpp:185
xrpl::DelegateSet::deleteDelegate
static TER deleteDelegate(ApplyView &view, SLE::Ref sle, beast::Journal j)
Definition
DelegateSet.cpp:143
xrpl::DelegateSet::doApply
TER doApply() override
Definition
DelegateSet.cpp:73
xrpl::DelegateSet::preclaim
static TER preclaim(PreclaimContext const &ctx)
Definition
DelegateSet.cpp:50
xrpl::ReadView
A view into a ledger.
Definition
ReadView.h:41
xrpl::STLedgerEntry::ConstRef
std::shared_ptr< STLedgerEntry const > const & ConstRef
Definition
STLedgerEntry.h:37
xrpl::STLedgerEntry::Ref
std::shared_ptr< STLedgerEntry > const & Ref
Definition
STLedgerEntry.h:35
xrpl::STTx
Definition
STTx.h:43
xrpl::Transactor::ConsequencesFactoryType::Normal
@ Normal
Definition
Transactor.h:175
xrpl::Transactor::view
ApplyView & view()
Definition
Transactor.h:184
xrpl::Transactor::Transactor
Transactor(Transactor const &)=delete
xrpl::XRPAmount
Definition
XRPAmount.h:28
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::NotTEC
TERSubset< CanCvtToNotTEC > NotTEC
Definition
TER.h:614
xrpl::after
bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
Definition
View.cpp:644
xrpl::TER
TERSubset< CanCvtToTER > TER
Definition
TER.h:654
xrpl::PreclaimContext
State information when determining if a tx is likely to claim a fee.
Definition
Transactor.h:92
xrpl::PreflightContext
State information when preflighting a tx.
Definition
Transactor.h:39
Generated by
1.17.0