From 8ed990ce943032063b744726c670abdc78ed1e93 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Sat, 3 Aug 2013 00:32:19 -0700 Subject: [PATCH] Fix a case where an offer is not detected as becoming unfunded. Mark two FIXMEs. --- src/cpp/ripple/ripple_RippleCalc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cpp/ripple/ripple_RippleCalc.cpp b/src/cpp/ripple/ripple_RippleCalc.cpp index 55fec68c5e..4d1db38d68 100644 --- a/src/cpp/ripple/ripple_RippleCalc.cpp +++ b/src/cpp/ripple/ripple_RippleCalc.cpp @@ -481,7 +481,7 @@ TER RippleCalc::calcNodeDeliverRev ( if (saInPassReq > saTakerPays) saInPassReq = saTakerPays; - if (!saInPassReq) + if (!saInPassReq) // FIXME: This is bogus { // After rounding did not want anything. WriteLog (lsINFO, RippleCalc) << boost::str (boost::format ("calcNodeDeliverRev: micro offer is unfunded.")); @@ -717,7 +717,7 @@ TER RippleCalc::calcNodeDeliverFwd ( % saInPassAct % saOutPassMax); - if (!saInSum) + if (!saInSum) // FIXME: We remove an offer if we didn't want anything out of it?! { WriteLog (lsINFO, RippleCalc) << "calcNodeDeliverFwd: Microscopic offer unfunded."; @@ -850,7 +850,7 @@ TER RippleCalc::calcNodeDeliverFwd ( lesActive.entryModify (sleOffer); - if (saOutPassAct == saOutFunded) + if ((saOutPassAct == saOutFunded) || saTakerGetsNew.isZero()) { // Offer became unfunded.