xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
ledger
AcceptedLedgerTx.h
1
#pragma once
2
3
#include <xrpl/basics/Blob.h>
4
#include <xrpl/basics/CountedObject.h>
5
#include <xrpl/json/json_value.h>
6
#include <xrpl/ledger/ReadView.h>
7
#include <xrpl/protocol/AccountID.h>
8
#include <xrpl/protocol/Protocol.h>
9
#include <xrpl/protocol/STObject.h>
10
#include <xrpl/protocol/STTx.h>
11
#include <xrpl/protocol/TER.h>
12
#include <xrpl/protocol/TxFormats.h>
13
#include <xrpl/protocol/TxMeta.h>
14
15
#include <boost/container/flat_set.hpp>
16
17
#include <
cstdint
>
18
#include <
memory
>
19
#include <
string
>
20
21
namespace
xrpl
{
22
35
class
AcceptedLedgerTx
:
public
CountedObject
<AcceptedLedgerTx>
36
{
37
public
:
38
AcceptedLedgerTx
(
39
std::shared_ptr<ReadView const>
const
& ledger,
40
std::shared_ptr<STTx const>
const
&,
41
std::shared_ptr<STObject const>
const
&);
42
43
[[nodiscard]]
std::shared_ptr<STTx const>
const
&
44
getTxn
()
const
45
{
46
return
txn_
;
47
}
48
[[nodiscard]]
TxMeta
const
&
49
getMeta
()
const
50
{
51
return
meta_
;
52
}
53
54
[[nodiscard]] boost::container::flat_set<AccountID>
const
&
55
getAffected
()
const
56
{
57
return
affected_
;
58
}
59
60
[[nodiscard]]
TxID
61
getTransactionID
()
const
62
{
63
return
txn_
->getTransactionID();
64
}
65
[[nodiscard]]
TxType
66
getTxnType
()
const
67
{
68
return
txn_
->getTxnType();
69
}
70
[[nodiscard]]
TER
71
getResult
()
const
72
{
73
return
meta_
.getResultTER();
74
}
75
[[nodiscard]]
std::uint32_t
76
getTxnSeq
()
const
77
{
78
return
meta_
.getIndex();
79
}
80
[[nodiscard]]
std::string
81
getEscMeta
()
const
;
82
83
[[nodiscard]]
json::Value
const
&
84
getJson
()
const
85
{
86
return
json_
;
87
}
88
89
private
:
90
std::shared_ptr<STTx const>
txn_
;
91
TxMeta
meta_
;
92
boost::container::flat_set<AccountID>
affected_
;
93
Blob
rawMeta_
;
94
json::Value
json_
;
95
};
96
97
}
// namespace xrpl
std::string
json::Value
Represents a JSON value.
Definition
json_value.h:117
xrpl::AcceptedLedgerTx::json_
json::Value json_
Definition
AcceptedLedgerTx.h:94
xrpl::AcceptedLedgerTx::getMeta
TxMeta const & getMeta() const
Definition
AcceptedLedgerTx.h:49
xrpl::AcceptedLedgerTx::getAffected
boost::container::flat_set< AccountID > const & getAffected() const
Definition
AcceptedLedgerTx.h:55
xrpl::AcceptedLedgerTx::getEscMeta
std::string getEscMeta() const
Definition
AcceptedLedgerTx.cpp:74
xrpl::AcceptedLedgerTx::getTransactionID
TxID getTransactionID() const
Definition
AcceptedLedgerTx.h:61
xrpl::AcceptedLedgerTx::rawMeta_
Blob rawMeta_
Definition
AcceptedLedgerTx.h:93
xrpl::AcceptedLedgerTx::getResult
TER getResult() const
Definition
AcceptedLedgerTx.h:71
xrpl::AcceptedLedgerTx::affected_
boost::container::flat_set< AccountID > affected_
Definition
AcceptedLedgerTx.h:92
xrpl::AcceptedLedgerTx::getTxnType
TxType getTxnType() const
Definition
AcceptedLedgerTx.h:66
xrpl::AcceptedLedgerTx::txn_
std::shared_ptr< STTx const > txn_
Definition
AcceptedLedgerTx.h:90
xrpl::AcceptedLedgerTx::meta_
TxMeta meta_
Definition
AcceptedLedgerTx.h:91
xrpl::AcceptedLedgerTx::AcceptedLedgerTx
AcceptedLedgerTx(std::shared_ptr< ReadView const > const &ledger, std::shared_ptr< STTx const > const &, std::shared_ptr< STObject const > const &)
Definition
AcceptedLedgerTx.cpp:24
xrpl::AcceptedLedgerTx::getJson
json::Value const & getJson() const
Definition
AcceptedLedgerTx.h:84
xrpl::AcceptedLedgerTx::getTxnSeq
std::uint32_t getTxnSeq() const
Definition
AcceptedLedgerTx.h:76
xrpl::AcceptedLedgerTx::getTxn
std::shared_ptr< STTx const > const & getTxn() const
Definition
AcceptedLedgerTx.h:44
xrpl::CountedObject< AcceptedLedgerTx >::CountedObject
CountedObject() noexcept
Definition
CountedObject.h:119
xrpl::TxMeta
Definition
TxMeta.h:26
cstdint
std::uint32_t
memory
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::TxType
TxType
Transaction type identifiers.
Definition
TxFormats.h:45
xrpl::TxID
UInt256 TxID
A transaction identifier.
Definition
Protocol.h:403
xrpl::TER
TERSubset< CanCvtToTER > TER
Definition
TER.h:654
xrpl::Blob
std::vector< unsigned char > Blob
Storage for linear binary data.
Definition
Blob.h:11
std::shared_ptr
string
Generated by
1.17.0