20 #include <ripple/basics/contract.h>
21 #include <ripple/beast/core/LexicalCast.h>
22 #include <ripple/shamap/SHAMapLeafNode.h>
27 boost::intrusive_ptr<SHAMapItem const> item,
31 assert(
item_->size() >= 12);
35 boost::intrusive_ptr<SHAMapItem const> item,
40 assert(
item_->size() >= 12);
43 boost::intrusive_ptr<SHAMapItem const>
const&
53 item_ = std::move(item);
55 auto const oldHash =
hash_;
59 return (oldHash !=
hash_);
91 assert(
item_ !=
nullptr);
boost::intrusive_ptr< SHAMapItem const > const & peekItem() const
std::string getString(SHAMapNodeID const &) const final override
std::uint32_t cowid_
Determines the owning SHAMap, if any.
SHAMapLeafNode(boost::intrusive_ptr< SHAMapItem const > item, std::uint32_t cowid)
Identifies a node inside a SHAMap.
virtual std::string getString(SHAMapNodeID const &) const
void invariants(bool is_root=false) const final override
virtual void updateHash()=0
Recalculate the hash of this node.
boost::intrusive_ptr< SHAMapItem const > item_
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
virtual SHAMapNodeType getType() const =0
Determines the type of node.
bool setItem(boost::intrusive_ptr< SHAMapItem const > i)
Set the item that this node points to and update the node's hash.
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.