xrpld
Loading...
Searching...
No Matches
tx/transactors/account/SignerListSet.h
1#pragma once
2
3#include <xrpl/protocol/Rules.h>
4#include <xrpl/protocol/STTx.h>
5#include <xrpl/tx/SignerEntries.h>
6#include <xrpl/tx/Transactor.h>
7
8#include <cstdint>
9#include <vector>
10
11namespace xrpl {
12
18{
19private:
20 // Values determined during preCompute for use later.
21 enum class Operation { Unknown, Set, Destroy };
25
26public:
28
30 {
31 }
32
33 static std::uint32_t
35
36 static NotTEC
37 preflight(PreflightContext const& ctx);
38
39 TER
40 doApply() override;
41 void
42 preCompute() override;
43
44 void
45 visitInvariantEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after) override;
46
47 [[nodiscard]] bool
49 STTx const& tx,
50 TER result,
51 XRPAmount fee,
52 ReadView const& view,
53 beast::Journal const& j) override;
54
55 // Interface used by AccountDelete
56 static TER
58 ServiceRegistry& registry,
60 AccountID const& account,
62
63private:
66
67 static NotTEC
69 std::uint32_t quorum,
71 AccountID const& account,
73 Rules const&);
74
75 TER
77 TER
79
80 void
81 writeSignersToSLE(SLE::pointer const& ledgerEntry, std::uint32_t flags) const;
82};
83
84} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:38
State information when applying a tx.
Writeable view to a ledger, for applying a transaction.
Definition ApplyView.h:118
A view into a ledger.
Definition ReadView.h:31
Rules controlling protocol behavior.
Definition Rules.h:33
std::shared_ptr< STLedgerEntry > pointer
std::shared_ptr< STLedgerEntry const > const & const_ref
Service registry for dependency injection.
static NotTEC preflight(PreflightContext const &ctx)
void preCompute() override
static std::tuple< NotTEC, std::uint32_t, std::vector< SignerEntries::SignerEntry >, Operation > determineOperation(STTx const &tx, ApplyFlags flags, beast::Journal j)
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.
static NotTEC validateQuorumAndSignerEntries(std::uint32_t quorum, std::vector< SignerEntries::SignerEntry > const &signers, AccountID const &account, beast::Journal j, Rules const &)
TER doApply() override
std::vector< SignerEntries::SignerEntry > signers_
static TER removeFromLedger(ServiceRegistry &registry, ApplyView &view, AccountID const &account, beast::Journal j)
void writeSignersToSLE(SLE::pointer const &ledgerEntry, std::uint32_t flags) const
static std::uint32_t getFlagsMask(PreflightContext const &ctx)
void visitInvariantEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after) override
Inspect a single ledger entry modified by this transaction.
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
TERSubset< CanCvtToNotTEC > NotTEC
Definition TER.h:594
bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
Definition View.cpp:554
ApplyFlags
Definition ApplyView.h:12
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
Definition AccountID.h:28
TERSubset< CanCvtToTER > TER
Definition TER.h:634
State information when preflighting a tx.
Definition Transactor.h:18