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 31291598ea
commit fca9a4abe4
2 changed files with 1 additions and 9 deletions

View File

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

View File

@@ -19,7 +19,7 @@ SHAMapTreeNode::SHAMapTreeNode (const SHAMapTreeNode& node, uint32 seq) : SHAMap
}
SHAMapTreeNode::SHAMapTreeNode (const SHAMapNode& node, SHAMapItem::ref item, TNType type, uint32 seq) :
SHAMapNode (node), mItem (item), mSeq (seq), mType (type), mIsBranch (0), mFullBelow (true)
SHAMapNode (node), mItem (item), mSeq (seq), mType (type), mIsBranch (0), mFullBelow (false)
{
assert (item->peekData ().size () >= 12);
updateHash ();