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