mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-24 13:05:53 +00:00
Remove old-style pathfinding code
All cases that still used the old RPF code now use new-style pathfinding. This includes unit tests, RPF requests with a ledger specified, and RPF requests in standalone mode.
This commit is contained in:
@@ -218,7 +218,7 @@ PathRequests::makePathRequest(
|
||||
insertPathRequest (req);
|
||||
app_.getLedgerMaster().newPathRequest();
|
||||
}
|
||||
return result.second;
|
||||
return std::move (result.second);
|
||||
}
|
||||
|
||||
// Make an old-style ripple_path_find request
|
||||
@@ -249,7 +249,24 @@ PathRequests::makeLegacyPathRequest(
|
||||
app_.getLedgerMaster().newPathRequest();
|
||||
}
|
||||
|
||||
return result.second;
|
||||
return std::move (result.second);
|
||||
}
|
||||
|
||||
Json::Value
|
||||
PathRequests::doLegacyPathRequest (
|
||||
Resource::Consumer& consumer,
|
||||
std::shared_ptr<ReadView const> const& inLedger,
|
||||
Json::Value const& request)
|
||||
{
|
||||
auto cache = std::make_shared<RippleLineCache> (inLedger);
|
||||
|
||||
auto req = std::make_shared<PathRequest> (app_, []{},
|
||||
consumer, ++mLastIdentifier, *this, mJournal);
|
||||
|
||||
auto result = req->doCreate (cache, request);
|
||||
if (result.first)
|
||||
result.second = req->doUpdate (cache, false);
|
||||
return std::move (result.second);
|
||||
}
|
||||
|
||||
} // ripple
|
||||
|
||||
Reference in New Issue
Block a user