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