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 NotTEC
55 preflight(PreflightContext const& ctx);
56
57 TER
58 doApply() override;
59 void
60 preCompute() override;
61
62 // Interface used by DeleteAccount
63 static TER
65 Application& app,
67 AccountID const& account,
69
70private:
71 static std::tuple<
72 NotTEC,
77
78 static NotTEC
80 std::uint32_t quorum,
82 AccountID const& account,
84 Rules const&);
85
86 TER
88 TER
90
91 void
92 writeSignersToSLE(SLE::pointer const& ledgerEntry, std::uint32_t flags)
93 const;
94};
95
97
98} // namespace ripple
99
100#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)
ApplyView & view()
Definition Transactor.h:161
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25
TERSubset< CanCvtToNotTEC > NotTEC
Definition TER.h:605
State information when preflighting a tx.
Definition Transactor.h:35