From 64345f90a81bfb600589dd32f64a0d40b8a075fd Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Tue, 11 Mar 2014 22:01:36 -0700 Subject: [PATCH] Allow setting LedgerConsensus to TRACE --- src/ripple_app/consensus/LedgerConsensus.cpp | 21 +++++++------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/ripple_app/consensus/LedgerConsensus.cpp b/src/ripple_app/consensus/LedgerConsensus.cpp index 6838c004d..e715e1360 100644 --- a/src/ripple_app/consensus/LedgerConsensus.cpp +++ b/src/ripple_app/consensus/LedgerConsensus.cpp @@ -406,13 +406,15 @@ public: typedef std::map::value_type u256_cvc_pair; - BOOST_FOREACH (u256_cvc_pair & it, vals) - if ((it.second.first > netLgrCount) || - ((it.second.first == netLgrCount) && (it.first == mPrevLedgerHash))) + BOOST_FOREACH (u256_cvc_pair & it, vals) { - netLgr = it.first; - netLgrCount = it.second.first; + if ((it.second.first > netLgrCount) || + ((it.second.first == netLgrCount) && (it.first == mPrevLedgerHash))) + { + netLgr = it.first; + netLgrCount = it.second.first; + } } if (netLgr != mPrevLedgerHash) @@ -928,15 +930,6 @@ private: << ":" << newLCL->getLedgerSeq (); uint256 newLCLHash = newLCL->getHash (); - if (ShouldLog (lsTRACE, LedgerConsensus)) - { - WriteLog (lsTRACE, LedgerConsensus) << "newLCL"; - Json::Value p; - newLCL->addJson (p - , LEDGER_JSON_DUMP_TXRP | LEDGER_JSON_DUMP_STATE); - WriteLog (lsTRACE, LedgerConsensus) << p; - } - statusChange (protocol::neACCEPTED_LEDGER, *newLCL); if (mValidating && !mConsensusFail)