Restore checkpointed ledger under all paths in PathFind.

This commit is contained in:
sublimator
2014-06-24 18:02:33 -04:00
committed by Nik Bougalis
parent 17d64de3d5
commit aec792f5b8

View File

@@ -214,7 +214,7 @@ TER rippleCalculate (
while (resultCode == temUNCERTAIN)
{
int iBest = -1;
const LedgerEntrySet lesCheckpoint = activeLedger;
LedgerEntrySet lesCheckpoint = activeLedger;
int iDry = 0;
// True, if ever computed multi-quality.
@@ -415,6 +415,10 @@ TER rippleCalculate (
}
else
{
// We must restore the activeLedger from lesCheckpoint in the case
// when iBest is -1 and just before the result is set to tesSUCCESS.
activeLedger.swapWith (lesCheckpoint);
resultCode = tesSUCCESS;
}
}