1#ifndef XRPL_SHAMAP_SHAMAPNODEID_H_INCLUDED
2#define XRPL_SHAMAP_SHAMAPNODEID_H_INCLUDED
4#include <xrpl/basics/CountedObject.h>
5#include <xrpl/basics/base_uint.h>
107 return "NodeID(root)";
139[[nodiscard]]
unsigned int
Tracks the number of instances of an object.
Identifies a node inside a SHAMap.
bool operator<(SHAMapNodeID const &n) const
Comparison operators.
SHAMapNodeID(SHAMapNodeID const &other)=default
unsigned int getDepth() const
uint256 const & getNodeID() const
bool operator>=(SHAMapNodeID const &n) const
SHAMapNodeID getChildNodeID(unsigned int m) const
std::string getRawString() const
bool operator!=(SHAMapNodeID const &n) 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.
bool operator<=(SHAMapNodeID const &n) const
bool operator==(SHAMapNodeID const &n) const
SHAMapNodeID & operator=(SHAMapNodeID const &other)=default
bool operator>(SHAMapNodeID const &n) const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::optional< SHAMapNodeID > deserializeSHAMapNodeID(void const *data, std::size_t size)
Return an object representing a serialized SHAMap Node ID.
std::ostream & operator<<(std::ostream &out, base_uint< Bits, Tag > const &u)
unsigned int selectBranch(SHAMapNodeID const &id, uint256 const &hash)
Returns the branch that would contain the given hash.
std::string to_string(base_uint< Bits, Tag > const &a)