3#include "util/Concepts.hpp"
5#include <boost/json/object.hpp>
7#include <xrpl/basics/Blob.h>
8#include <xrpl/basics/base_uint.h>
9#include <xrpl/proto/org/xrpl/rpc/v1/get_ledger.pb.h>
10#include <xrpl/proto/org/xrpl/rpc/v1/ledger.pb.h>
11#include <xrpl/protocol/LedgerHeader.h>
12#include <xrpl/protocol/STTx.h>
13#include <xrpl/protocol/Serializer.h>
14#include <xrpl/protocol/TxFormats.h>
15#include <xrpl/protocol/TxMeta.h>
31template <ripple::TxType... Types>
34 static constexpr bool kSPEC_TAG =
true;
42 [[nodiscard]]
static constexpr bool
43 wants(ripple::TxType type)
noexcept
45 return ((Types == type) || ...);
73 return raw == other.raw
74 and metaRaw == other.metaRaw
75 and sttx.getTransactionID() == other.sttx.getTransactionID()
76 and meta.getTxID() == other.meta.getTxID()
79 and type == other.type;
101 std::string successor;
102 std::string predecessor;
107 operator==(
Object const&)
const =
default;
114 std::string firstBook;
115 std::string bookBase;
125 std::vector<Transaction> transactions;
126 std::vector<Object> objects;
127 std::optional<std::vector<BookSuccessor>> successors;
128 std::optional<std::vector<std::string>> edgeKeys;
130 ripple::LedgerHeader header;
131 std::string rawHeader;
142 auto const serialized = [](
auto const& hdr) {
143 ripple::Serializer ser;
144 ripple::addRaw(hdr, ser);
145 return ser.getString();
148 return transactions == other.transactions
149 and objects == other.objects
150 and successors == other.successors
151 and edgeKeys == other.edgeKeys
152 and serialized(header) == serialized(other.header)
153 and rawHeader == other.rawHeader
154 and seq == other.seq;
This namespace implements the data access layer and related components.
Definition AmendmentCenter.cpp:56
static consteval auto hasNoDuplicates(auto &&... values)
Checks that the list of given values contains no duplicates.
Definition Concepts.hpp:24
Represents a book successor.
Definition Models.hpp:113
Represents an entire ledger diff worth of transactions and objects.
Definition Models.hpp:124
bool operator==(LedgerData const &other) const
Compares LedgerData objects to each other without considering the header field.
Definition Models.hpp:140
Represents a single object on the ledger.
Definition Models.hpp:86
ModType
Modification type for the object.
Definition Models.hpp:90
A specification for the Registry.
Definition Models.hpp:33
static constexpr bool wants(ripple::TxType type) noexcept
Checks if the transaction type was requested.
Definition Models.hpp:43
Represents a task for the extractors.
Definition Models.hpp:161
Priority
Represents the priority of the task.
Definition Models.hpp:165
Represents a single transaction on the ledger.
Definition Models.hpp:52
bool operator==(Transaction const &other) const
Compares Transaction objects to each other without considering sttx and meta fields.
Definition Models.hpp:71