mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 02:55:50 +00:00
Fix ripple best path determination.
This commit is contained in:
@@ -2109,8 +2109,8 @@ int iPass = 0;
|
||||
assert(!!pspCur->saInPass && !!pspCur->saOutPass);
|
||||
|
||||
if ((!bLimitQuality || pspCur->uQuality <= uQualityLimit) // Quality is not limted or increment has allowed quality.
|
||||
|| !pspBest // Best is not yet set.
|
||||
|| PathState::lessPriority(pspBest, pspCur)) // Current is better than set.
|
||||
&& (!pspBest // Best is not yet set.
|
||||
|| PathState::lessPriority(pspBest, pspCur))) // Current is better than set.
|
||||
{
|
||||
cLog(lsDEBUG) << boost::str(boost::format("rippleCalc: better: uQuality=%s saInPass=%s saOutPass=%s")
|
||||
% STAmount::saFromRate(pspCur->uQuality)
|
||||
|
||||
@@ -646,10 +646,10 @@ buster.testCase("Indirect ripple", {
|
||||
|
||||
testutils.verify_balances(self.remote,
|
||||
{
|
||||
"alice" : [ "-50/USD/bob", "-100/USD/carol" ],
|
||||
"alice" : [ "-100/USD/bob", "-50/USD/carol" ],
|
||||
"amazon" : "150/USD/mtgox",
|
||||
"bob" : "50/USD/mtgox",
|
||||
"carol" : "0/USD/mtgox",
|
||||
"bob" : "0/USD/mtgox",
|
||||
"carol" : "50/USD/mtgox",
|
||||
},
|
||||
callback);
|
||||
},
|
||||
@@ -737,10 +737,10 @@ buster.testCase("Indirect ripple", {
|
||||
|
||||
testutils.verify_balances(self.remote,
|
||||
{
|
||||
"alice" : [ "-65.00000000000001/USD/bob", "-100/USD/carol" ],
|
||||
"alice" : [ "-100/USD/bob", "-65.00000000000001/USD/carol" ],
|
||||
"amazon" : "150/USD/mtgox",
|
||||
"bob" : "35/USD/mtgox",
|
||||
"carol" : "0/USD/mtgox",
|
||||
"bob" : "0/USD/mtgox",
|
||||
"carol" : "35/USD/mtgox",
|
||||
},
|
||||
callback);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user