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:
JoelKatz
2016-08-11 01:06:32 -07:00
committed by seelabs
parent ab45c490d7
commit fc73fbd050
9 changed files with 122 additions and 469 deletions

View File

@@ -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