mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-21 12:15:54 +00:00
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "data/BackendInterface.hpp"
|
||||
#include "data/Types.hpp"
|
||||
#include "etl/ETLHelpers.hpp"
|
||||
#include "etl/NFTHelpers.hpp"
|
||||
#include "util/Assert.hpp"
|
||||
#include "util/log/Logger.hpp"
|
||||
@@ -33,6 +34,7 @@
|
||||
#include <ripple/basics/strHex.h>
|
||||
#include <ripple/proto/org/xrpl/rpc/v1/xrp_ledger.grpc.pb.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
@@ -145,7 +147,7 @@ public:
|
||||
continue;
|
||||
}
|
||||
cacheUpdates.push_back(
|
||||
{*ripple::uint256::fromVoidChecked(obj.key()), {obj.mutable_data()->begin(), obj.mutable_data()->end()}}
|
||||
{*ripple::uint256::fromVoidChecked(obj.key()), {obj.data().begin(), obj.data().end()}}
|
||||
);
|
||||
if (!cacheOnly) {
|
||||
if (!lastKey_.empty())
|
||||
@@ -193,4 +195,21 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
inline std::vector<AsyncCallData>
|
||||
makeAsyncCallData(uint32_t const sequence, uint32_t const numMarkers)
|
||||
{
|
||||
auto const markers = getMarkers(numMarkers);
|
||||
|
||||
std::vector<AsyncCallData> result;
|
||||
result.reserve(markers.size());
|
||||
|
||||
for (size_t i = 0; i + 1 < markers.size(); ++i) {
|
||||
result.emplace_back(sequence, markers[i], markers[i + 1]);
|
||||
}
|
||||
if (not markers.empty()) {
|
||||
result.emplace_back(sequence, markers.back(), std::nullopt);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace etl::impl
|
||||
|
||||
Reference in New Issue
Block a user