xrpld
Loading...
Searching...
No Matches
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
21namespace xrpl {
22
35class AcceptedLedgerTx : public CountedObject<AcceptedLedgerTx>
36{
37public:
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&
56 {
57 return affected_;
58 }
59
60 [[nodiscard]] TxID
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
89private:
92 boost::container::flat_set<AccountID> affected_;
95};
96
97} // namespace xrpl
Represents a JSON value.
Definition json_value.h:117
TxMeta const & getMeta() const
boost::container::flat_set< AccountID > const & getAffected() const
std::string getEscMeta() const
boost::container::flat_set< AccountID > affected_
std::shared_ptr< STTx const > txn_
AcceptedLedgerTx(std::shared_ptr< ReadView const > const &ledger, std::shared_ptr< STTx const > const &, std::shared_ptr< STObject const > const &)
json::Value const & getJson() const
std::uint32_t getTxnSeq() const
std::shared_ptr< STTx const > const & getTxn() const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
TxType
Transaction type identifiers.
Definition TxFormats.h:45
TERSubset< CanCvtToTER > TER
Definition TER.h:647
std::vector< unsigned char > Blob
Storage for linear binary data.
Definition Blob.h:11
uint256 TxID
A transaction identifier.
Definition Protocol.h:391