diff --git a/src/ripple_rpc/handlers/RipplePathFind.cpp b/src/ripple_rpc/handlers/RipplePathFind.cpp index 922fc0487..06e7486f7 100644 --- a/src/ripple_rpc/handlers/RipplePathFind.cpp +++ b/src/ripple_rpc/handlers/RipplePathFind.cpp @@ -90,13 +90,16 @@ Json::Value RPCHandler::doRipplePathFind (Json::Value params, Resource::Charge& RippleLineCache::pointer cache; if (lpLedger) - { // The caller specified a ledger + { + // The caller specified a ledger lpLedger = boost::make_shared (boost::ref (*lpLedger), false); cache = boost::make_shared(lpLedger); } else - { // Use the default ledger and cache - lpLedger = mNetOps->getValidatedLedger(); + { + // The closed ledger is recent and any nodes made resident + // have the best chance to persist + lpLedger = mNetOps->getClosedLedger(); cache = getApp().getPathRequests().getLineCache(lpLedger, false); }