diff --git a/src/cpp/ripple/TrustSetTransactor.cpp b/src/cpp/ripple/TrustSetTransactor.cpp index 4a66bcd78..df379f13d 100644 --- a/src/cpp/ripple/TrustSetTransactor.cpp +++ b/src/cpp/ripple/TrustSetTransactor.cpp @@ -73,7 +73,6 @@ TER TrustSetTransactor::doApply() return tecNO_DST; } - const STAmount saSrcXRPBalance = mTxnAccount->getFieldAmount(sfBalance); const uint32 uOwnerCount = mTxnAccount->getFieldU32(sfOwnerCount); // The reserve required to create the line. const uint64 uReserveCreate = mEngine->getLedger()->getReserve(uOwnerCount + 1); @@ -263,7 +262,7 @@ TER TrustSetTransactor::doApply() mEngine->entryDelete(sleRippleState); } else if (bReserveIncrease - && saSrcXRPBalance.getNValue() < uReserveCreate) // Reserve is not scaled by load. + && mPriorBalance.getNValue() < uReserveCreate) // Reserve is not scaled by load. { cLog(lsINFO) << "doTrustSet: Delay transaction: Insufficent reserve to add trust line."; @@ -286,7 +285,7 @@ TER TrustSetTransactor::doApply() return tecNO_LINE_REDUNDANT; } - else if (saSrcXRPBalance.getNValue() < uReserveCreate) // Reserve is not scaled by load. + else if (mPriorBalance.getNValue() < uReserveCreate) // Reserve is not scaled by load. { cLog(lsINFO) << "doTrustSet: Delay transaction: Line does not exist. Insufficent reserve to create line.";