mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-24 13:05:53 +00:00
Autobridging:
Complete implementation of bridged offers crossings. While processing an offer A:B we consider both the A:B order book and the combined A:XRP and XRP:B books and pick the better offers. The net result is better liquidity and potentially better rates. * Rearchitect core::Taker to perform direct and bridged crossings. * Compute bridged qualities. * Implement a new Bridged OfferCreate transactor. * Factor out common code from the Bridged and Direct OfferCreate transactors. * Perform flow calculations without losing accuracy. * Rename all transactors. * Cleanups.
This commit is contained in:
committed by
Vinnie Falco
parent
72bc4ebf37
commit
27e8d44a56
@@ -262,25 +262,6 @@ bool parseUrl (const std::string& strUrl, std::string& strScheme, std::string& s
|
||||
return bMatch;
|
||||
}
|
||||
|
||||
//
|
||||
// Quality parsing
|
||||
// - integers as is.
|
||||
// - floats multiplied by a billion
|
||||
bool parseQuality (const std::string& strSource, std::uint32_t& uQuality)
|
||||
{
|
||||
uQuality = beast::lexicalCast <std::uint32_t> (strSource);
|
||||
|
||||
if (!uQuality)
|
||||
{
|
||||
float fQuality = beast::lexicalCast <float> (strSource);
|
||||
|
||||
if (fQuality)
|
||||
uQuality = (std::uint32_t) (QUALITY_ONE * fQuality);
|
||||
}
|
||||
|
||||
return !!uQuality;
|
||||
}
|
||||
|
||||
beast::StringPairArray parseDelimitedKeyValueString (beast::String parameters,
|
||||
beast::beast_wchar delimiter)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user