From 8d660736a8e3bce7a9b00bad842061d63b52c77e Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Sun, 10 Mar 2013 18:27:02 -0700 Subject: [PATCH] Fix cases where we don't relay transactions. --- src/cpp/ripple/NetworkOPs.cpp | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/cpp/ripple/NetworkOPs.cpp b/src/cpp/ripple/NetworkOPs.cpp index da49c25e1a..ec5ab34740 100644 --- a/src/cpp/ripple/NetworkOPs.cpp +++ b/src/cpp/ripple/NetworkOPs.cpp @@ -374,27 +374,24 @@ Transaction::pointer NetworkOPs::processTransaction(Transaction::pointer trans, if (r == tefFAILURE) throw Fault(IO_ERROR); - if (isTerRetry(r)) - { // transaction should be held - cLog(lsDEBUG) << "Transaction should be held: " << r; - trans->setStatus(HELD); - theApp->getMasterTransaction().canonicalize(trans, true); - mLedgerMaster->addHeldTransaction(trans); - return trans; - } - if (r == tefPAST_SEQ) - { // duplicate or conflict - cLog(lsINFO) << "Transaction is obsolete"; - trans->setStatus(OBSOLETE); - return trans; - } - if (r == tesSUCCESS) { cLog(lsINFO) << "Transaction is now included in open ledger"; trans->setStatus(INCLUDED); theApp->getMasterTransaction().canonicalize(trans, true); } + else if (r == tefPAST_SEQ) + { // duplicate or conflict + cLog(lsINFO) << "Transaction is obsolete"; + trans->setStatus(OBSOLETE); + } + else if (isTerRetry(r)) + { // transaction should be held + cLog(lsDEBUG) << "Transaction should be held: " << r; + trans->setStatus(HELD); + theApp->getMasterTransaction().canonicalize(trans, true); + mLedgerMaster->addHeldTransaction(trans); + } else { cLog(lsDEBUG) << "Status other than success " << r;