Fix some possible cases where a node could be marked as full below when it shouldn't be.

This commit is contained in:
JoelKatz
2013-07-06 12:35:18 -07:00
parent 6f90ed259b
commit dc08a9061e
2 changed files with 5 additions and 3 deletions

View File

@@ -77,7 +77,8 @@ void SHAMap::getMissingNodes (std::vector<SHAMapNode>& nodeIDs, std::vector<uint
if (have_all)
{
node->setFullBelow ();
fullBelowCache.add (node->getNodeHash ());
if (mType == smtSTATE)
fullBelowCache.add (node->getNodeHash ());
}
}
@@ -143,7 +144,8 @@ std::vector<uint256> SHAMap::getNeededHashes (int max, SHAMapSyncFilter* filter)
if (have_all)
{
node->setFullBelow ();
fullBelowCache.add (node->getNodeHash ());
if (mType == smtSTATE)
fullBelowCache.add (node->getNodeHash ());
}
}