rippled
Loading...
Searching...
No Matches
SetSignerList.h
1//------------------------------------------------------------------------------
2/*
3 This file is part of rippled: https://github.com/ripple/rippled
4 Copyright (c) 2014 Ripple Labs Inc.
5
6 Permission to use, copy, modify, and/or distribute this software for any
7 purpose with or without fee is hereby granted, provided that the above
8 copyright notice and this permission notice appear in all copies.
9
10 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17*/
18//==============================================================================
19
20#ifndef RIPPLE_TX_SETSIGNERLIST_H_INCLUDED
21#define RIPPLE_TX_SETSIGNERLIST_H_INCLUDED
22
23#include <xrpld/app/tx/detail/SignerEntries.h>
24#include <xrpld/app/tx/detail/Transactor.h>
25
26#include <xrpl/protocol/Rules.h>
27#include <xrpl/protocol/STTx.h>
28
29#include <cstdint>
30#include <vector>
31
32namespace ripple {
33
39{
40private:
41 // Values determined during preCompute for use later.
46
47public:
49
51 {
52 }
53
54 static std::uint32_t
56
57 static NotTEC
58 preflight(PreflightContext const& ctx);
59
60 TER
61 doApply() override;
62 void
63 preCompute() override;
64
65 // Interface used by DeleteAccount
66 static TER
68 Application& app,
70 AccountID const& account,
72
73private:
74 static std::tuple<
75 NotTEC,
80
81 static NotTEC
83 std::uint32_t quorum,
85 AccountID const& account,
87 Rules const&);
88
89 TER
91 TER
93
94 void
95 writeSignersToSLE(SLE::pointer const& ledgerEntry, std::uint32_t flags)
96 const;
97};
98
100
101} // namespace ripple
102
103#endif
A generic endpoint for log messages.
Definition Journal.h:60
State information when applying a tx.
Writeable view to a ledger, for applying a transaction.
Definition ApplyView.h:143
Rules controlling protocol behavior.
Definition Rules.h:38
See the README.md for an overview of the SetSignerList transaction that this class implements.
void writeSignersToSLE(SLE::pointer const &ledgerEntry, std::uint32_t flags) const
SetSignerList(ApplyContext &ctx)
static NotTEC preflight(PreflightContext const &ctx)
static constexpr ConsequencesFactoryType ConsequencesFactory
static NotTEC validateQuorumAndSignerEntries(std::uint32_t quorum, std::vector< SignerEntries::SignerEntry > const &signers, AccountID const &account, beast::Journal j, Rules const &)
void preCompute() override
static TER removeFromLedger(Application &app, ApplyView &view, AccountID const &account, beast::Journal j)
std::uint32_t quorum_
std::vector< SignerEntries::SignerEntry > signers_
static std::tuple< NotTEC, std::uint32_t, std::vector< SignerEntries::SignerEntry >, Operation > determineOperation(STTx const &tx, ApplyFlags flags, beast::Journal j)
static std::uint32_t getFlagsMask(PreflightContext const &ctx)
ApplyView & view()
Definition Transactor.h:163
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25
TERSubset< CanCvtToNotTEC > NotTEC
Definition TER.h:609
State information when preflighting a tx.
Definition Transactor.h:35