From 78eb8a0cdca53efd10e4313966e3bf6a2daadf14 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 10 Jun 2013 19:29:24 -0700 Subject: [PATCH] Clean this up a bit more. --- src/cpp/ripple/Peer.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/cpp/ripple/Peer.cpp b/src/cpp/ripple/Peer.cpp index cbec95bc0e..6fd3deb13a 100644 --- a/src/cpp/ripple/Peer.cpp +++ b/src/cpp/ripple/Peer.cpp @@ -852,17 +852,16 @@ static void checkTransaction(Job&, int flags, SerializedTransaction::pointer stx if (isSetBit(flags, SF_SIGGOOD)) tx = boost::make_shared(stx, false); else - { tx = boost::make_shared(stx, true); - if (tx->getStatus() == INVALID) - { - theApp->getSuppression().setFlag(stx->getTransactionID(), SF_BAD); - Peer::punishPeer(peer, LT_InvalidSignature); - return; - } - else - theApp->getSuppression().setFlag(stx->getTransactionID(), SF_SIGGOOD); + + if (tx->getStatus() == INVALID) + { + theApp->getSuppression().setFlag(stx->getTransactionID(), SF_BAD); + Peer::punishPeer(peer, LT_InvalidSignature); + return; } + else + theApp->getSuppression().setFlag(stx->getTransactionID(), SF_SIGGOOD); theApp->getOPs().processTransaction(tx, isSetBit(flags, SF_TRUSTED));