Convert all of an asset (RIPD-655)

This commit is contained in:
Miguel Portilla
2015-07-29 15:29:18 -04:00
committed by Scott Schurr
parent 1842878c40
commit 3d777f3f5d
24 changed files with 838 additions and 612 deletions

View File

@@ -36,7 +36,6 @@ class RippleCalc; // for logging
void PathState::clear()
{
allLiquidityConsumed_ = false;
saInPass = saInReq.zeroed();
saOutPass = saOutReq.zeroed();
unfundedOffers_.clear ();
@@ -68,7 +67,7 @@ void PathState::reset(STAmount const& in, STAmount const& out)
<< " saOutAct=" << outAct()
<< " saOutReq=" << outReq();
assert (outAct() < outReq());
assert(outAct() < outReq());
assert (nodes().size () >= 2);
}
@@ -323,7 +322,8 @@ TER PathState::pushNode (
node.issue_.currency);
STAmount saLimit;
if (saOwed <= zero) {
if (saOwed <= zero)
{
saLimit = creditLimit (view(),
node.account_,
backNode.account_,
@@ -361,7 +361,7 @@ TER PathState::pushNode (
else
node.issue_.account = backNode.issue_.account;
node.saRateMax = saZero;
node.saRateMax = STAmount::saZero;
node.saRevDeliver = STAmount (node.issue_);
node.saFwdDeliver = node.saRevDeliver;