From b7eccd1dce9016df7fbd90e5978d0ffecf67f477 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 15 Apr 2013 07:14:48 -0700 Subject: [PATCH] Reset mLedger if request is invalid to ensure that findPaths fails. --- src/cpp/ripple/Pathfinder.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cpp/ripple/Pathfinder.cpp b/src/cpp/ripple/Pathfinder.cpp index 07550972e..9f3c604a8 100644 --- a/src/cpp/ripple/Pathfinder.cpp +++ b/src/cpp/ripple/Pathfinder.cpp @@ -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;