Fix ripple best path determination.

This commit is contained in:
Arthur Britto
2012-11-03 04:32:46 -07:00
parent 3097948f09
commit f4d4b3920d
2 changed files with 8 additions and 8 deletions

View File

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

View File

@@ -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);
},