3#include <xrpl/basics/SHAMapHash.h>
4#include <xrpl/basics/base_uint.h>
5#include <xrpl/basics/safe_cast.h>
6#include <xrpl/beast/utility/instrumentation.h>
7#include <xrpl/shamap/SHAMapItem.h>
8#include <xrpl/shamap/SHAMapNodeID.h>
9#include <xrpl/shamap/SHAMapTreeNode.h>
19 boost::intrusive_ptr<SHAMapItem const>
item_;
24 boost::intrusive_ptr<SHAMapItem const> item,
74 XRPL_ASSERT(node.isLeaf(),
"xrpl::leafKey : node is a leaf");
boost::intrusive_ptr< SHAMapItem const > item_
SHAMapLeafNode(boost::intrusive_ptr< SHAMapItem const > item, std::uint32_t cowid)
SHAMapLeafNode(SHAMapLeafNode const &)=delete
bool isInner() const final
Determines if this is an inner node.
void invariants(bool isRoot=false) const final
bool setItem(boost::intrusive_ptr< SHAMapItem const > i)
Set the item that this node points to and update the node's hash.
bool isLeaf() const final
Determines if this is a leaf node.
SHAMapLeafNode & operator=(SHAMapLeafNode const &)=delete
std::string getString(SHAMapNodeID const &) const final
boost::intrusive_ptr< SHAMapItem const > const & peekItem() const
Identifies a node inside a SHAMap.
SHAMapTreeNode(std::uint32_t cowid) noexcept
Construct a node.
std::uint32_t cowid() const
Returns the SHAMap that owns this node.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Dest safeDowncast(Src *s) noexcept
uint256 const & leafKey(SHAMapTreeNode const &node)
Return the key of the item held by a SHAMap leaf node.