xrpld
Loading...
Searching...
No Matches
SHAMapSyncFilter.h
1#pragma once
2
3#include <xrpl/basics/Blob.h>
4#include <xrpl/basics/SHAMapHash.h>
5#include <xrpl/shamap/SHAMapTreeNode.h>
6
7#include <cstdint>
8#include <optional>
9
13namespace xrpl {
14
16{
17public:
18 virtual ~SHAMapSyncFilter() = default;
19 SHAMapSyncFilter() = default;
22 operator=(SHAMapSyncFilter const&) = delete;
23
24 // Note that the nodeData is overwritten by this call
25 virtual void
27 bool fromFilter,
28 SHAMapHash const& nodeHash,
29 std::uint32_t ledgerSeq,
30 Blob&& nodeData,
31 SHAMapNodeType type) const = 0;
32
33 [[nodiscard]] virtual std::optional<Blob>
34 getNode(SHAMapHash const& nodeHash) const = 0;
35};
36
37} // namespace xrpl
virtual std::optional< Blob > getNode(SHAMapHash const &nodeHash) const =0
SHAMapSyncFilter & operator=(SHAMapSyncFilter const &)=delete
virtual void gotNode(bool fromFilter, SHAMapHash const &nodeHash, std::uint32_t ledgerSeq, Blob &&nodeData, SHAMapNodeType type) const =0
virtual ~SHAMapSyncFilter()=default
SHAMapSyncFilter(SHAMapSyncFilter const &)=delete
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
std::vector< unsigned char > Blob
Storage for linear binary data.
Definition Blob.h:11