mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Use last closed ledger for old pathfinding
This commit is contained in:
committed by
Nik Bougalis
parent
6339800946
commit
aaabec0b55
@@ -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<Ledger> (boost::ref (*lpLedger), false);
|
||||
cache = boost::make_shared<RippleLineCache>(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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user