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 <cstddef>
13#include <cstdint>
14#include <optional>
15
16namespace xrpl {
17
18// Sync filters allow low-level SHAMapSync code to interact correctly with
19// higher-level structures such as caches and transaction stores
20
21// This class is needed on both add and check functions
22// sync filter for transaction sets during consensus building
24{
25public:
27
36
38
39 // Note that the nodeData is overwritten by this call
40 void
41 gotNode(
42 bool fromFilter,
43 SHAMapHash const& nodeHash,
44 std::uint32_t ledgerSeq,
45 Blob&& nodeData,
46 SHAMapNodeType type) const override;
47
48 [[nodiscard]] std::optional<Blob>
49 getNode(SHAMapHash const& nodeHash) const override;
50
51private:
55};
56
57} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:44
static constexpr std::size_t kMinTxNodeBytesToParse
The size a node's hash-prefixed wire data must reach before gotNode() tries to parse and resubmit it ...
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
constexpr std::size_t kMinShaMapItemBytes
std::vector< unsigned char > Blob
Storage for linear binary data.
Definition Blob.h:11