mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 14:35:52 +00:00
Fix some possible cases where a node could be marked as full below when it shouldn't be.
This commit is contained in:
@@ -77,7 +77,8 @@ void SHAMap::getMissingNodes (std::vector<SHAMapNode>& nodeIDs, std::vector<uint
|
|||||||
if (have_all)
|
if (have_all)
|
||||||
{
|
{
|
||||||
node->setFullBelow ();
|
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)
|
if (have_all)
|
||||||
{
|
{
|
||||||
node->setFullBelow ();
|
node->setFullBelow ();
|
||||||
fullBelowCache.add (node->getNodeHash ());
|
if (mType == smtSTATE)
|
||||||
|
fullBelowCache.add (node->getNodeHash ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ SHAMapTreeNode::SHAMapTreeNode (const SHAMapTreeNode& node, uint32 seq) : SHAMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
SHAMapTreeNode::SHAMapTreeNode (const SHAMapNode& node, SHAMapItem::ref item, TNType type, uint32 seq) :
|
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);
|
assert (item->peekData ().size () >= 12);
|
||||||
updateHash ();
|
updateHash ();
|
||||||
|
|||||||
Reference in New Issue
Block a user