Reduce exceptions during syncing.

This commit is contained in:
JoelKatz
2013-06-20 19:53:57 -07:00
parent 6bc6ed3e2e
commit a3e9d279dd

View File

@@ -327,11 +327,8 @@ SHAMapAddNode SHAMap::addKnownNode (const SHAMapNode& node, Blob const& rawNode,
if (fullBelowCache.isPresent (iNode->getChildHash (branch)))
return SHAMapAddNode::okay ();
try
{
iNode = getNodePointer (iNode->getChildNodeID (branch), iNode->getChildHash (branch), filter);
}
catch (SHAMapMissingNode&)
SHAMapTreeNode *nextNode = getNodePointerNT (iNode->getChildNodeID (branch), iNode->getChildHash (branch), filter);
if (!nextNode)
{
if (iNode->getDepth () != (node.getDepth () - 1))
{
@@ -361,6 +358,7 @@ SHAMapAddNode SHAMap::addKnownNode (const SHAMapNode& node, Blob const& rawNode,
mTNByID[node] = newNode;
return SHAMapAddNode::useful ();
}
iNode = nextNode;
}
WriteLog (lsTRACE, SHAMap) << "got node, already had it (late)";