22#include "util/Concepts.hpp"
24#include <boost/json/object.hpp>
26#include <xrpl/basics/Blob.h>
27#include <xrpl/basics/base_uint.h>
28#include <xrpl/proto/org/xrpl/rpc/v1/get_ledger.pb.h>
29#include <xrpl/proto/org/xrpl/rpc/v1/ledger.pb.h>
30#include <xrpl/protocol/LedgerHeader.h>
31#include <xrpl/protocol/STTx.h>
32#include <xrpl/protocol/Serializer.h>
33#include <xrpl/protocol/TxFormats.h>
34#include <xrpl/protocol/TxMeta.h>
41namespace etlng::model {
50template <ripple::TxType... Types>
53 static constexpr bool kSPEC_TAG =
true;
61 [[nodiscard]]
static constexpr bool
62 wants(ripple::TxType type)
noexcept
64 return ((Types == type) || ...);
92 return raw == other.raw
93 and metaRaw == other.metaRaw
94 and sttx.getTransactionID() == other.sttx.getTransactionID()
95 and meta.getTxID() == other.meta.getTxID()
98 and type == other.type;
120 std::string successor;
121 std::string predecessor;
126 operator==(
Object const&)
const =
default;
133 std::string firstBook;
134 std::string bookBase;
144 std::vector<Transaction> transactions;
145 std::vector<Object> objects;
146 std::optional<std::vector<BookSuccessor>> successors;
147 std::optional<std::vector<std::string>> edgeKeys;
149 ripple::LedgerHeader header;
150 std::string rawHeader;
161 auto const serialized = [](
auto const& hdr) {
162 ripple::Serializer ser;
163 ripple::addRaw(hdr, ser);
164 return ser.getString();
167 return transactions == other.transactions
168 and objects == other.objects
169 and successors == other.successors
170 and edgeKeys == other.edgeKeys
171 and serialized(header) == serialized(other.header)
172 and rawHeader == other.rawHeader
173 and seq == other.seq;
This namespace implements the data access layer and related components.
Definition AmendmentCenter.cpp:70
static consteval auto hasNoDuplicates(auto &&... values)
Checks that the list of given values contains no duplicates.
Definition Concepts.hpp:43
Represents a book successor.
Definition Models.hpp:132
Represents an entire ledger diff worth of transactions and objects.
Definition Models.hpp:143
bool operator==(LedgerData const &other) const
Compares LedgerData objects to each other without considering the header field.
Definition Models.hpp:159
Represents a single object on the ledger.
Definition Models.hpp:105
ModType
Modification type for the object.
Definition Models.hpp:109
A specification for the Registry.
Definition Models.hpp:52
static constexpr bool wants(ripple::TxType type) noexcept
Checks if the transaction type was requested.
Definition Models.hpp:62
Represents a task for the extractors.
Definition Models.hpp:180
Priority
Represents the priority of the task.
Definition Models.hpp:184
Represents a single transaction on the ledger.
Definition Models.hpp:71
bool operator==(Transaction const &other) const
Compares Transaction objects to each other without considering sttx and meta fields.
Definition Models.hpp:90