Reset mLedger if request is invalid to ensure that findPaths fails.

This commit is contained in:
JoelKatz
2013-04-15 07:14:48 -07:00
parent 8d6de40e52
commit b7eccd1dce

View File

@@ -153,6 +153,7 @@ Pathfinder::Pathfinder(Ledger::ref ledger,
if (((mSrcAccountID == mDstAccountID) && (mSrcCurrencyID == mDstAmount.getCurrency())) || mDstAmount.isZero())
{ // no need to send to same account with same currency, must send non-zero
bValid = false;
mLedger.reset();
return;
}
bValid = true;