mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
New Zero struct implements "compare with zero."
* Zero lets classes efficiently compare with 0, so you can use constructors like x < zero or y != zero. * New BEAST_CONSTEXPR to handle Windows/C++11 differences regarding the constexpr specifier.
This commit is contained in:
@@ -307,7 +307,7 @@ TER PathState::pushNode (
|
||||
}
|
||||
else if ((isSetBit (sleBck->getFieldU32 (sfFlags), lsfRequireAuth)
|
||||
&& !isSetBit (sleRippleState->getFieldU32 (sfFlags), (bHigh ? lsfHighAuth : lsfLowAuth)))
|
||||
&& sleRippleState->getFieldAmount(sfBalance).isZero()) // CHECKME
|
||||
&& sleRippleState->getFieldAmount(sfBalance) == zero) // CHECKME
|
||||
{
|
||||
WriteLog (lsWARNING, RippleCalc) << "pushNode: delay: can't receive IOUs from issuer without auth.";
|
||||
|
||||
@@ -319,7 +319,7 @@ TER PathState::pushNode (
|
||||
STAmount saOwed = lesEntries.rippleOwed (pnCur.uAccountID, pnBck.uAccountID, pnCur.uCurrencyID);
|
||||
STAmount saLimit;
|
||||
|
||||
if (!saOwed.isPositive ()
|
||||
if (saOwed <= zero
|
||||
&& -saOwed >= (saLimit = lesEntries.rippleLimit (pnCur.uAccountID, pnBck.uAccountID, pnCur.uCurrencyID)))
|
||||
{
|
||||
WriteLog (lsWARNING, RippleCalc) << boost::str (boost::format ("pushNode: dry: saOwed=%s saLimit=%s")
|
||||
|
||||
Reference in New Issue
Block a user