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
25#include <xrpl/protocol/AccountID.h>
26
27#include <boost/container/flat_set.hpp>
28
29namespace ripple {
30
31class Logs;
32
45class AcceptedLedgerTx : public CountedObject<AcceptedLedgerTx>
46{
47public:
52
54 getTxn() const
55 {
56 return mTxn;
57 }
58 TxMeta const&
59 getMeta() const
60 {
61 return mMeta;
62 }
63
64 boost::container::flat_set<AccountID> const&
66 {
67 return mAffected;
68 }
69
70 TxID
72 {
73 return mTxn->getTransactionID();
74 }
75 TxType
76 getTxnType() const
77 {
78 return mTxn->getTxnType();
79 }
80 TER
81 getResult() const
82 {
83 return mMeta.getResultTER();
84 }
86 getTxnSeq() const
87 {
88 return mMeta.getIndex();
89 }
91 getEscMeta() const;
92
93 Json::Value const&
94 getJson() const
95 {
96 return mJson;
97 }
98
99private:
102 boost::container::flat_set<AccountID> mAffected;
105};
106
107} // namespace ripple
108
109#endif
Represents a JSON value.
Definition json_value.h:149
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:78
TER getResultTER() const
Definition TxMeta.h:73
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25
TxType
Transaction type identifiers.
Definition TxFormats.h:57