diff --git a/src/ripple_app/paths/RippleCalc.cpp b/src/ripple_app/paths/RippleCalc.cpp index 24c17e9e7..6967c65aa 100644 --- a/src/ripple_app/paths/RippleCalc.cpp +++ b/src/ripple_app/paths/RippleCalc.cpp @@ -2819,6 +2819,13 @@ TER RippleCalc::rippleCalc ( } else { + // We must restore the activeLedger from lesCheckpoint in the case + // when iBest is -1 and just before the result is set to tesSUCCESS. + // There was an issue when not on the first increment and there was + // no best path, where we did not restore the ledger to the last + // checkpoint. + + activeLedger = lesCheckpoint.duplicate (); terResult = tesSUCCESS; } }