mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix a bug that corrupts order books.
This commit is contained in:
@@ -893,6 +893,8 @@ TER LedgerEntrySet::dirDelete (
|
|||||||
// Fix next to point to its new previous.
|
// Fix next to point to its new previous.
|
||||||
sleNext->setFieldU64 (sfIndexPrevious, uNodePrevious);
|
sleNext->setFieldU64 (sfIndexPrevious, uNodePrevious);
|
||||||
entryModify (sleNext);
|
entryModify (sleNext);
|
||||||
|
|
||||||
|
entryDelete(sleNode);
|
||||||
}
|
}
|
||||||
// Last node.
|
// Last node.
|
||||||
else if (bKeepRoot || uNodePrevious)
|
else if (bKeepRoot || uNodePrevious)
|
||||||
@@ -973,7 +975,7 @@ bool LedgerEntrySet::dirNext (
|
|||||||
if (!sleNode)
|
if (!sleNode)
|
||||||
{ // This should never happen
|
{ // This should never happen
|
||||||
WriteLog (lsFATAL, LedgerEntrySet) << "Corrupt directory: index:" << uRootIndex << " next:" << uNodeNext;
|
WriteLog (lsFATAL, LedgerEntrySet) << "Corrupt directory: index:" << uRootIndex << " next:" << uNodeNext;
|
||||||
throw std::runtime_error ("Corrupt directory");
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return dirNext (uRootIndex, sleNode, uDirEntry, uEntryIndex);
|
return dirNext (uRootIndex, sleNode, uDirEntry, uEntryIndex);
|
||||||
|
|||||||
Reference in New Issue
Block a user