mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Off by one in hasNode
This commit is contained in:
@@ -472,7 +472,7 @@ bool SHAMap::deepCompare(SHAMap& other)
|
||||
bool SHAMap::hasNode(const SHAMapNode& nodeID, const uint256& nodeHash)
|
||||
{
|
||||
SHAMapTreeNode* node = root.get();
|
||||
while (node->isInner() && (node->getDepth() <= nodeID.getDepth()))
|
||||
while (node->isInner() && (node->getDepth() < nodeID.getDepth()))
|
||||
{
|
||||
int branch = node->selectBranch(nodeID.getNodeID());
|
||||
if (node->isEmptyBranch(branch))
|
||||
|
||||
Reference in New Issue
Block a user