rippled
Loading...
Searching...
No Matches
TransactionStateSF.cpp
1#include <xrpld/app/ledger/TransactionStateSF.h>
2
3namespace xrpl {
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(type != SHAMapNodeType::tnTRANSACTION_NM, "xrpl::TransactionStateSF::gotNode : valid input");
15 db_.store(hotTRANSACTION_NODE, std::move(nodeData), nodeHash.as_uint256(), ledgerSeq);
16}
17
20{
21 return fp_.getFetchPack(nodeHash.as_uint256());
22}
23
24} // namespace xrpl
virtual std::optional< Blob > getFetchPack(uint256 const &nodeHash)=0
Retrieves partial ledger data of the corresponding 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:24
AbstractFetchPackContainer & fp_
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
NodeStore::Database & db_
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
@ hotTRANSACTION_NODE
Definition NodeObject.h:16