Have OfferCreate require positive funds.

This commit is contained in:
Arthur Britto
2013-04-26 11:14:18 -07:00
parent 3c35a1e8b7
commit c34b1eb9ee
2 changed files with 3 additions and 3 deletions

View File

@@ -138,7 +138,7 @@ TER OfferCreateTransactor::takeOffers(
STAmount saSubTakerGets = saTakerGets-saTakerGot; // How much more is wanted.
// Figure out next offer to take, if needed.
if (saTakerFunds // Taker has funds available.
if (saTakerFunds.isPositive() // Taker has funds available.
&& saSubTakerPays.isPositive()
&& saSubTakerGets.isPositive())
{
@@ -162,7 +162,7 @@ TER OfferCreateTransactor::takeOffers(
}
}
if (!saTakerFunds) // Taker has no funds.
if (!saTakerFunds.isPositive()) // Taker has no funds.
{
// Done. Ran out of funds on previous round. As fees aren't calculated directly in this routine, funds are checked here.
cLog(lsINFO) << "takeOffers: done: taker unfunded.";