|
xrpld
|
A path from the root of the map down to some node, pairing each node with the ID naming its position. More...

Public Member Functions | |
| bool | empty () const |
| std::size_t | size () const |
| std::pair< SHAMapTreeNodePtr, SHAMapNodeID > const & | top () const |
| void | pop () |
| void | clear () |
| void | pushRoot (SHAMapTreeNodePtr node) |
| Start a path at the root of the map, whose ID is the zero-depth ID by definition. | |
| void | pushChild (SHAMapTreeNodePtr node, unsigned int branch) |
| Extend the path to the child of the current node reached by branch. | |
| void | pushNode (SHAMapTreeNodePtr node, UInt256 const &target) |
| Extend the path to a node lying on the path to target. | |
Private Attributes | |
| std::stack< std::pair< SHAMapTreeNodePtr, SHAMapNodeID > > | stack_ |
A path from the root of the map down to some node, pairing each node with the ID naming its position.
The two halves of an entry must agree, and the only way to get that wrong is to compute an ID from the wrong branch. So this type does not accept an ID at all: every push takes the branch being descended and derives the ID itself, so a node and its ID cannot disagree. Reads are exposed through the same accessors a std::stack would offer.
|
nodiscard |
|
nodiscard |
|
nodiscard |
| void xrpl::SHAMap::NodePathStack::pushRoot | ( | SHAMapTreeNodePtr | node | ) |
| void xrpl::SHAMap::NodePathStack::pushChild | ( | SHAMapTreeNodePtr | node, |
| unsigned int | branch ) |
| void xrpl::SHAMap::NodePathStack::pushNode | ( | SHAMapTreeNodePtr | node, |
| UInt256 const & | target ) |
|
private |