mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 15:35:50 +00:00
Bugfix.
This commit is contained in:
@@ -219,7 +219,7 @@ SHAMapItem::pointer SHAMap::onlyBelow(SHAMapTreeNode::pointer node)
|
|||||||
found=false;
|
found=false;
|
||||||
SHAMapTreeNode::pointer nextNode;
|
SHAMapTreeNode::pointer nextNode;
|
||||||
|
|
||||||
for(int i=0; i<15; i++)
|
for(int i=0; i<16; i++)
|
||||||
if(!node->isEmptyBranch(i))
|
if(!node->isEmptyBranch(i))
|
||||||
{
|
{
|
||||||
if(found) return SHAMapItem::pointer(); // two leaves below
|
if(found) return SHAMapItem::pointer(); // two leaves below
|
||||||
@@ -230,6 +230,7 @@ SHAMapItem::pointer SHAMap::onlyBelow(SHAMapTreeNode::pointer node)
|
|||||||
|
|
||||||
if(!found)
|
if(!found)
|
||||||
{
|
{
|
||||||
|
std::cerr << node->getString() << std::endl;
|
||||||
assert(false);
|
assert(false);
|
||||||
return SHAMapItem::pointer();
|
return SHAMapItem::pointer();
|
||||||
}
|
}
|
||||||
@@ -242,7 +243,7 @@ SHAMapItem::pointer SHAMap::onlyBelow(SHAMapTreeNode::pointer node)
|
|||||||
void SHAMap::eraseChildren(SHAMapTreeNode::pointer node)
|
void SHAMap::eraseChildren(SHAMapTreeNode::pointer node)
|
||||||
{ // this node has only one item below it, erase its children
|
{ // this node has only one item below it, erase its children
|
||||||
bool erase=false;
|
bool erase=false;
|
||||||
while(!node->isLeaf())
|
while(node->isInner())
|
||||||
{
|
{
|
||||||
for(int i=0; i<16; i++)
|
for(int i=0; i<16; i++)
|
||||||
if(!node->isEmptyBranch(i))
|
if(!node->isEmptyBranch(i))
|
||||||
@@ -256,6 +257,7 @@ void SHAMap::eraseChildren(SHAMapTreeNode::pointer node)
|
|||||||
}
|
}
|
||||||
erase=true;
|
erase=true;
|
||||||
node=nextNode;
|
node=nextNode;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
returnNode(node, true);
|
returnNode(node, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user