diff --git a/src/cpp/ripple/NetworkOPs.cpp b/src/cpp/ripple/NetworkOPs.cpp index b589567df..d093891a0 100644 --- a/src/cpp/ripple/NetworkOPs.cpp +++ b/src/cpp/ripple/NetworkOPs.cpp @@ -165,7 +165,7 @@ void NetworkOPs::submitTransaction(Job&, SerializedTransaction::pointer iTrans, // Sterilize transaction through serialization. // This is fully synchronous and deprecated -Transaction::pointer NetworkOPs::submitTransactionSync(const Transaction::pointer& tpTrans) +Transaction::pointer NetworkOPs::submitTransactionSync(const Transaction::pointer& tpTrans, bool bSubmit) { Serializer s; tpTrans->getSTransaction()->add(s); @@ -179,7 +179,8 @@ Transaction::pointer NetworkOPs::submitTransactionSync(const Transaction::pointe } else if (tpTransNew->getSTransaction()->isEquivalent(*tpTrans->getSTransaction())) { - (void) NetworkOPs::processTransaction(tpTransNew); + if (bSubmit) + (void) NetworkOPs::processTransaction(tpTransNew); } else { diff --git a/src/cpp/ripple/NetworkOPs.h b/src/cpp/ripple/NetworkOPs.h index 66d757ffa..3101880dd 100644 --- a/src/cpp/ripple/NetworkOPs.h +++ b/src/cpp/ripple/NetworkOPs.h @@ -160,7 +160,7 @@ public: // typedef boost::function stCallback; // must complete immediately void submitTransaction(Job&, SerializedTransaction::pointer, stCallback callback = stCallback()); - Transaction::pointer submitTransactionSync(const Transaction::pointer& tpTrans); + Transaction::pointer submitTransactionSync(const Transaction::pointer& tpTrans, bool bSubmit=true); void runTransactionQueue(); Transaction::pointer processTransaction(Transaction::pointer, stCallback);