rippled
Loading...
Searching...
No Matches
xrpld
app
tx
detail
SetSignerList.h
1
#pragma once
2
3
#include <xrpld/app/tx/detail/SignerEntries.h>
4
#include <xrpld/app/tx/detail/Transactor.h>
5
6
#include <xrpl/protocol/Rules.h>
7
#include <xrpl/protocol/STTx.h>
8
9
#include <
cstdint
>
10
#include <
vector
>
11
12
namespace
xrpl
{
13
18
class
SetSignerList
:
public
Transactor
19
{
20
private
:
21
// Values determined during preCompute for use later.
22
enum
Operation
{
unknown
,
set
,
destroy
};
23
Operation
do_
{
unknown
};
24
std::uint32_t
quorum_
{0};
25
std::vector<SignerEntries::SignerEntry>
signers_
;
26
27
public
:
28
static
constexpr
ConsequencesFactoryType
ConsequencesFactory
{
Blocker
};
29
30
explicit
SetSignerList
(
ApplyContext
& ctx) :
Transactor
(ctx)
31
{
32
}
33
34
static
std::uint32_t
35
getFlagsMask
(
PreflightContext
const
& ctx);
36
37
static
NotTEC
38
preflight
(
PreflightContext
const
& ctx);
39
40
TER
41
doApply
()
override
;
42
void
43
preCompute
()
override
;
44
45
// Interface used by DeleteAccount
46
static
TER
47
removeFromLedger
(
Application
& app,
ApplyView
&
view
,
AccountID
const
& account,
beast::Journal
j);
48
49
private
:
50
static
std::tuple<NotTEC, std::uint32_t, std::vector<SignerEntries::SignerEntry>
,
Operation
>
51
determineOperation
(
STTx
const
& tx,
ApplyFlags
flags,
beast::Journal
j);
52
53
static
NotTEC
54
validateQuorumAndSignerEntries
(
55
std::uint32_t
quorum,
56
std::vector<SignerEntries::SignerEntry>
const
& signers,
57
AccountID
const
& account,
58
beast::Journal
j,
59
Rules
const
&);
60
61
TER
62
replaceSignerList
();
63
TER
64
destroySignerList
();
65
66
void
67
writeSignersToSLE
(
SLE::pointer
const
& ledgerEntry,
std::uint32_t
flags)
const
;
68
};
69
70
using
SignerListSet
=
SetSignerList
;
71
72
}
// namespace xrpl
beast::Journal
A generic endpoint for log messages.
Definition
Journal.h:40
xrpl::Application
Definition
Application.h:95
xrpl::ApplyContext
State information when applying a tx.
Definition
ApplyContext.h:17
xrpl::ApplyView
Writeable view to a ledger, for applying a transaction.
Definition
ApplyView.h:114
xrpl::Rules
Rules controlling protocol behavior.
Definition
Rules.h:18
xrpl::STTx
Definition
STTx.h:28
xrpl::SetSignerList
See the README.md for an overview of the SetSignerList transaction that this class implements.
Definition
SetSignerList.h:19
xrpl::SetSignerList::do_
Operation do_
Definition
SetSignerList.h:23
xrpl::SetSignerList::determineOperation
static std::tuple< NotTEC, std::uint32_t, std::vector< SignerEntries::SignerEntry >, Operation > determineOperation(STTx const &tx, ApplyFlags flags, beast::Journal j)
Definition
SetSignerList.cpp:24
xrpl::SetSignerList::quorum_
std::uint32_t quorum_
Definition
SetSignerList.h:24
xrpl::SetSignerList::doApply
TER doApply() override
Definition
SetSignerList.cpp:92
xrpl::SetSignerList::replaceSignerList
TER replaceSignerList()
Definition
SetSignerList.cpp:267
xrpl::SetSignerList::destroySignerList
TER destroySignerList()
Definition
SetSignerList.cpp:321
xrpl::SetSignerList::removeFromLedger
static TER removeFromLedger(Application &app, ApplyView &view, AccountID const &account, beast::Journal j)
Definition
SetSignerList.cpp:198
xrpl::SetSignerList::writeSignersToSLE
void writeSignersToSLE(SLE::pointer const &ledgerEntry, std::uint32_t flags) const
Definition
SetSignerList.cpp:339
xrpl::SetSignerList::preCompute
void preCompute() override
Definition
SetSignerList.cpp:113
xrpl::SetSignerList::getFlagsMask
static std::uint32_t getFlagsMask(PreflightContext const &ctx)
Definition
SetSignerList.cpp:55
xrpl::SetSignerList::validateQuorumAndSignerEntries
static NotTEC validateQuorumAndSignerEntries(std::uint32_t quorum, std::vector< SignerEntries::SignerEntry > const &signers, AccountID const &account, beast::Journal j, Rules const &)
Definition
SetSignerList.cpp:208
xrpl::SetSignerList::SetSignerList
SetSignerList(ApplyContext &ctx)
Definition
SetSignerList.h:30
xrpl::SetSignerList::signers_
std::vector< SignerEntries::SignerEntry > signers_
Definition
SetSignerList.h:25
xrpl::SetSignerList::preflight
static NotTEC preflight(PreflightContext const &ctx)
Definition
SetSignerList.cpp:62
xrpl::SetSignerList::ConsequencesFactory
static constexpr ConsequencesFactoryType ConsequencesFactory
Definition
SetSignerList.h:28
xrpl::SetSignerList::Operation
Operation
Definition
SetSignerList.h:22
xrpl::SetSignerList::unknown
@ unknown
Definition
SetSignerList.h:22
xrpl::SetSignerList::destroy
@ destroy
Definition
SetSignerList.h:22
xrpl::SetSignerList::set
@ set
Definition
SetSignerList.h:22
xrpl::TERSubset
Definition
TER.h:395
xrpl::Transactor
Definition
Transactor.h:106
xrpl::Transactor::ConsequencesFactoryType
ConsequencesFactoryType
Definition
Transactor.h:122
xrpl::Transactor::Blocker
@ Blocker
Definition
Transactor.h:122
xrpl::Transactor::view
ApplyView & view()
Definition
Transactor.h:128
xrpl::base_uint< 160, detail::AccountIDTag >
cstdint
std::uint32_t
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::ApplyFlags
ApplyFlags
Definition
ApplyView.h:10
std::shared_ptr< STLedgerEntry >
xrpl::PreflightContext
State information when preflighting a tx.
Definition
Transactor.h:15
std::tuple
vector
Generated by
1.9.8