rippled
Loading...
Searching...
No Matches
xrpld
app
ledger
ConsensusTransSetSF.h
1
#pragma once
2
3
#include <xrpld/app/main/Application.h>
4
5
#include <xrpl/basics/TaggedCache.h>
6
#include <xrpl/shamap/SHAMapSyncFilter.h>
7
8
namespace
xrpl
{
9
10
// Sync filters allow low-level SHAMapSync code to interact correctly with
11
// higher-level structures such as caches and transaction stores
12
13
// This class is needed on both add and check functions
14
// sync filter for transaction sets during consensus building
15
class
ConsensusTransSetSF
:
public
SHAMapSyncFilter
16
{
17
public
:
18
using
NodeCache
=
TaggedCache<SHAMapHash, Blob>
;
19
20
ConsensusTransSetSF
(
Application
& app,
NodeCache
& nodeCache);
21
22
// Note that the nodeData is overwritten by this call
23
void
24
gotNode
(
bool
fromFilter,
SHAMapHash
const
& nodeHash,
std::uint32_t
ledgerSeq,
Blob
&& nodeData,
SHAMapNodeType
type)
25
const override
;
26
27
std::optional<Blob>
28
getNode
(
SHAMapHash
const
& nodeHash)
const override
;
29
30
private
:
31
Application
&
app_
;
32
NodeCache
&
m_nodeCache
;
33
beast::Journal
const
j_
;
34
};
35
36
}
// namespace xrpl
beast::Journal
A generic endpoint for log messages.
Definition
Journal.h:40
xrpl::Application
Definition
Application.h:95
xrpl::ConsensusTransSetSF
Definition
ConsensusTransSetSF.h:16
xrpl::ConsensusTransSetSF::getNode
std::optional< Blob > getNode(SHAMapHash const &nodeHash) const override
Definition
ConsensusTransSetSF.cpp:59
xrpl::ConsensusTransSetSF::j_
beast::Journal const j_
Definition
ConsensusTransSetSF.h:33
xrpl::ConsensusTransSetSF::m_nodeCache
NodeCache & m_nodeCache
Definition
ConsensusTransSetSF.h:32
xrpl::ConsensusTransSetSF::app_
Application & app_
Definition
ConsensusTransSetSF.h:31
xrpl::ConsensusTransSetSF::gotNode
void gotNode(bool fromFilter, SHAMapHash const &nodeHash, std::uint32_t ledgerSeq, Blob &&nodeData, SHAMapNodeType type) const override
Definition
ConsensusTransSetSF.cpp:20
xrpl::SHAMapHash
Definition
SHAMapHash.h:14
xrpl::SHAMapSyncFilter
Definition
SHAMapSyncFilter.h:11
xrpl::TaggedCache< SHAMapHash, Blob >
std::uint32_t
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::SHAMapNodeType
SHAMapNodeType
Definition
SHAMapTreeNode.h:23
std::optional
std::vector< unsigned char >
Generated by
1.9.8