rippled
Loading...
Searching...
No Matches
AcceptedLedgerTx.h
1//------------------------------------------------------------------------------
2/*
3 This file is part of rippled: https://github.com/ripple/rippled
4 Copyright (c) 2012, 2013 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_APP_LEDGER_ACCEPTEDLEDGERTX_H_INCLUDED
21#define RIPPLE_APP_LEDGER_ACCEPTEDLEDGERTX_H_INCLUDED
22
23#include <xrpld/app/ledger/Ledger.h>
24#include <xrpl/protocol/AccountID.h>
25#include <boost/container/flat_set.hpp>
26
27namespace ripple {
28
29class Logs;
30
43class AcceptedLedgerTx : public CountedObject<AcceptedLedgerTx>
44{
45public:
50
52 getTxn() const
53 {
54 return mTxn;
55 }
56 TxMeta const&
57 getMeta() const
58 {
59 return mMeta;
60 }
61
62 boost::container::flat_set<AccountID> const&
64 {
65 return mAffected;
66 }
67
68 TxID
70 {
71 return mTxn->getTransactionID();
72 }
73 TxType
74 getTxnType() const
75 {
76 return mTxn->getTxnType();
77 }
78 TER
79 getResult() const
80 {
81 return mMeta.getResultTER();
82 }
84 getTxnSeq() const
85 {
86 return mMeta.getIndex();
87 }
89 getEscMeta() const;
90
91 Json::Value const&
92 getJson() const
93 {
94 return mJson;
95 }
96
97private:
100 boost::container::flat_set<AccountID> mAffected;
103};
104
105} // namespace ripple
106
107#endif
Represents a JSON value.
Definition: json_value.h:147
A transaction that is in a closed ledger.
boost::container::flat_set< AccountID > mAffected
std::shared_ptr< STTx const > mTxn
boost::container::flat_set< AccountID > const & getAffected() const
std::uint32_t getTxnSeq() const
std::shared_ptr< STTx const > const & getTxn() const
std::string getEscMeta() const
Json::Value const & getJson() const
TxMeta const & getMeta() const
Tracks the number of instances of an object.
std::uint32_t getIndex() const
Definition: TxMeta.h:73
TER getResultTER() const
Definition: TxMeta.h:68
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: algorithm.h:26
TxType
Transaction type identifiers.
Definition: TxFormats.h:57