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