xrpld
Loading...
Searching...
No Matches
AcceptedLedgerTx.h
1#pragma once
2
3#include <xrpl/basics/CountedObject.h>
4#include <xrpl/ledger/ReadView.h>
5#include <xrpl/protocol/AccountID.h>
6#include <xrpl/protocol/STTx.h>
7#include <xrpl/protocol/TxMeta.h>
8
9#include <boost/container/flat_set.hpp>
10
11namespace xrpl {
12
25class AcceptedLedgerTx : public CountedObject<AcceptedLedgerTx>
26{
27public:
32
33 [[nodiscard]] std::shared_ptr<STTx const> const&
34 getTxn() const
35 {
36 return txn_;
37 }
38 [[nodiscard]] TxMeta const&
39 getMeta() const
40 {
41 return meta_;
42 }
43
44 [[nodiscard]] boost::container::flat_set<AccountID> const&
46 {
47 return affected_;
48 }
49
50 [[nodiscard]] TxID
52 {
53 return txn_->getTransactionID();
54 }
55 [[nodiscard]] TxType
56 getTxnType() const
57 {
58 return txn_->getTxnType();
59 }
60 [[nodiscard]] TER
61 getResult() const
62 {
63 return meta_.getResultTER();
64 }
65 [[nodiscard]] std::uint32_t
66 getTxnSeq() const
67 {
68 return meta_.getIndex();
69 }
70 [[nodiscard]] std::string
71 getEscMeta() const;
72
73 [[nodiscard]] json::Value const&
74 getJson() const
75 {
76 return json_;
77 }
78
79private:
82 boost::container::flat_set<AccountID> affected_;
85};
86
87} // namespace xrpl
Represents a JSON value.
Definition json_value.h:130
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:41
TERSubset< CanCvtToTER > TER
Definition TER.h:634
std::vector< unsigned char > Blob
Storage for linear binary data.
Definition Blob.h:10
uint256 TxID
A transaction identifier.
Definition Protocol.h:275