xrpld
Loading...
Searching...
No Matches
ConsensusTransSetSF.h
1#pragma once
2
3#include <xrpld/app/main/Application.h>
4
5#include <xrpl/basics/Blob.h>
6#include <xrpl/basics/SHAMapHash.h>
7#include <xrpl/basics/TaggedCache.h>
8#include <xrpl/beast/utility/Journal.h>
9#include <xrpl/shamap/SHAMapSyncFilter.h>
10#include <xrpl/shamap/SHAMapTreeNode.h>
11
12#include <cstdint>
13#include <optional>
14
15namespace xrpl {
16
17// Sync filters allow low-level SHAMapSync code to interact correctly with
18// higher-level structures such as caches and transaction stores
19
20// This class is needed on both add and check functions
21// sync filter for transaction sets during consensus building
23{
24public:
26
28
29 // Note that the nodeData is overwritten by this call
30 void
31 gotNode(
32 bool fromFilter,
33 SHAMapHash const& nodeHash,
34 std::uint32_t ledgerSeq,
35 Blob&& nodeData,
36 SHAMapNodeType type) const override;
37
38 [[nodiscard]] std::optional<Blob>
39 getNode(SHAMapHash const& nodeHash) const override;
40
41private:
45};
46
47} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:44
ConsensusTransSetSF(Application &app, NodeCache &nodeCache)
TaggedCache< SHAMapHash, Blob > NodeCache
std::optional< Blob > getNode(SHAMapHash const &nodeHash) const override
void gotNode(bool fromFilter, SHAMapHash const &nodeHash, std::uint32_t ledgerSeq, Blob &&nodeData, SHAMapNodeType type) const override
Map/cache combination.
Definition TaggedCache.h:67
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