Fix a case where an offer is not detected as becoming unfunded. Mark two FIXMEs.

This commit is contained in:
JoelKatz
2013-08-03 00:32:19 -07:00
committed by David Schwartz
parent 05ee52a70d
commit 8ed990ce94

View File

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