xrpld
Loading...
Searching...
No Matches
TransactionStateSF.cpp
1#include <xrpld/app/ledger/TransactionStateSF.h>
2
3#include <xrpl/basics/Blob.h>
4#include <xrpl/basics/SHAMapHash.h>
5#include <xrpl/beast/utility/instrumentation.h>
6#include <xrpl/nodestore/NodeObject.h>
7#include <xrpl/shamap/SHAMapTreeNode.h>
8
9#include <cstdint>
10#include <optional>
11#include <utility>
12
13namespace xrpl {
14
15void
17 bool,
18 SHAMapHash const& nodeHash,
19 std::uint32_t ledgerSeq,
20 Blob&& nodeData,
21 SHAMapNodeType type) const
22
23{
24 XRPL_ASSERT(
25 type != SHAMapNodeType::TnTransactionNm, "xrpl::TransactionStateSF::gotNode : valid input");
26 db_.store(
27 NodeObjectType::TransactionNode, std::move(nodeData), nodeHash.asUInt256(), ledgerSeq);
28}
29
32{
33 return fp_.getFetchPack(nodeHash.asUInt256());
34}
35
36} // namespace xrpl
uint256 const & asUInt256() 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
std::vector< unsigned char > Blob
Storage for linear binary data.
Definition Blob.h:10