rippled
Loading...
Searching...
No Matches
TransactionStateSF.cpp
1#include <xrpld/app/ledger/TransactionStateSF.h>
2
3namespace ripple {
4
5void
7 bool,
8 SHAMapHash const& nodeHash,
9 std::uint32_t ledgerSeq,
10 Blob&& nodeData,
11 SHAMapNodeType type) const
12
13{
14 XRPL_ASSERT(
16 "ripple::TransactionStateSF::gotNode : valid input");
17 db_.store(
19 std::move(nodeData),
20 nodeHash.as_uint256(),
21 ledgerSeq);
22}
23
26{
27 return fp_.getFetchPack(nodeHash.as_uint256());
28}
29
30} // namespace ripple
virtual std::optional< Blob > getFetchPack(uint256 const &nodeHash)=0
Retrieves partial ledger data of the coresponding hash from peers.
virtual void store(NodeObjectType type, Blob &&data, uint256 const &hash, std::uint32_t ledgerSeq)=0
Store the object.
uint256 const & as_uint256() const
Definition SHAMapHash.h:25
void gotNode(bool fromFilter, SHAMapHash const &nodeHash, std::uint32_t ledgerSeq, Blob &&nodeData, SHAMapNodeType type) const override
NodeStore::Database & db_
std::optional< Blob > getNode(SHAMapHash const &nodeHash) const override
AbstractFetchPackContainer & fp_
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
@ hotTRANSACTION_NODE
Definition NodeObject.h:17