3#include <xrpl/basics/CountedObject.h>
4#include <xrpl/basics/base_uint.h>
43 [[nodiscard]]
unsigned int
101 return "NodeID(root)";
135[[nodiscard]]
unsigned int
Identifies a node inside a SHAMap.
uint256 const & getNodeID() const
static SHAMapNodeID createID(int depth, uint256 const &key)
Create a SHAMapNodeID of a node with the depth of the node and the key of a leaf.
SHAMapNodeID getChildNodeID(unsigned int m) const
SHAMapNodeID(SHAMapNodeID const &other)=default
SHAMapNodeID & operator=(SHAMapNodeID const &other)=default
bool operator==(SHAMapNodeID const &n) const
Equality, which the spaceship above does not provide.
std::strong_ordering operator<=>(SHAMapNodeID const &n) const
Comparison operators.
unsigned int getDepth() const
std::string getRawString() const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::ostream & operator<<(std::ostream &out, BaseUInt< Bits, Tag > const &u)
std::string to_string(BaseUInt< Bits, Tag > const &a)
unsigned int selectBranch(SHAMapNodeID const &id, uint256 const &hash)
Returns the branch that would contain the given hash.
std::optional< SHAMapNodeID > deserializeSHAMapNodeID(void const *data, std::size_t size)
Return an object representing a serialized SHAMap Node ID.