20 #ifndef RIPPLE_SHAMAP_SHAMAPACCOUNTSTATELEAFNODE_H_INCLUDED
21 #define RIPPLE_SHAMAP_SHAMAPACCOUNTSTATELEAFNODE_H_INCLUDED
23 #include <ripple/basics/CountedObject.h>
24 #include <ripple/protocol/HashPrefix.h>
25 #include <ripple/protocol/digest.h>
26 #include <ripple/shamap/SHAMapItem.h>
27 #include <ripple/shamap/SHAMapLeafNode.h>
28 #include <ripple/shamap/SHAMapNodeID.h>
39 boost::intrusive_ptr<SHAMapItem const> item,
47 boost::intrusive_ptr<SHAMapItem const> item,
57 return std::make_shared<SHAMapAccountStateLeafNode>(
77 s.addRaw(
item_->slice());
78 s.addBitString(
item_->key());
86 s.addRaw(
item_->slice());
87 s.addBitString(
item_->key());
std::uint32_t cowid() const
Returns the SHAMap that owns this node.
Tracks the number of instances of an object.
void serializeWithPrefix(Serializer &s) const final override
Serialize the node in a format appropriate for hashing.
static constexpr unsigned const char wireTypeAccountState
std::shared_ptr< SHAMapTreeNode > clone(std::uint32_t cowid) const final override
Make a copy of this node, setting the owner.
SHAMapAccountStateLeafNode(boost::intrusive_ptr< SHAMapItem const > item, std::uint32_t cowid, SHAMapHash const &hash)
boost::intrusive_ptr< SHAMapItem const > item_
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
SHAMapAccountStateLeafNode(boost::intrusive_ptr< SHAMapItem const > item, std::uint32_t cowid)
A leaf node for a state object.
sha512_half_hasher::result_type sha512Half(Args const &... args)
Returns the SHA512-Half of a series of objects.
void updateHash() final override
Recalculate the hash of this node.
void serializeForWire(Serializer &s) const final override
Serialize the node in a format appropriate for sending over the wire.
SHAMapNodeType getType() const final override
Determines the type of node.