Reduce exceptions during syncing.

This commit is contained in:
JoelKatz
2013-06-20 19:53:57 -07:00
parent ff1b7e70f7
commit 5f81c7c10f

View File

@@ -322,11 +322,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))
{
@@ -356,6 +353,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)";