Cleanups.

This commit is contained in:
JoelKatz
2012-05-26 15:11:10 -07:00
parent 2866cec281
commit d442534c70
3 changed files with 8 additions and 8 deletions

View File

@@ -124,8 +124,9 @@ SHAMapTreeNode* SHAMap::walkToPointer(const uint256& id)
while (!inNode->isLeaf())
{
int branch = inNode->selectBranch(id);
if (inNode->isEmptyBranch(branch)) return NULL;
inNode = getNodePointer(inNode->getChildNodeID(branch), inNode->getChildHash(branch));
const uint256& nextHash = inNode->getChildHash(branch);
if (!nextHash) return NULL;
inNode = getNodePointer(inNode->getChildNodeID(branch), nextHash);
if (!inNode) throw SHAMapException(MissingNode);
}
return (inNode->getTag() == id) ? inNode : NULL;