From 0458d1910eab489110a6352da4e316d5d363658c Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Thu, 29 Oct 2015 10:56:07 -0700 Subject: [PATCH] Cleanups --- src/ripple/app/ledger/Ledger.cpp | 3 +-- src/ripple/app/ledger/impl/LedgerConsensusImp.cpp | 10 ++++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/ripple/app/ledger/Ledger.cpp b/src/ripple/app/ledger/Ledger.cpp index acf8fe9dcb..6291a258a4 100644 --- a/src/ripple/app/ledger/Ledger.cpp +++ b/src/ripple/app/ledger/Ledger.cpp @@ -405,8 +405,7 @@ void Ledger::setAccepted ( std::uint32_t closeTime, int closeResolution, bool correctCloseTime, Config const& config) { - // Used when we witnessed the consensus. Rounds the close time, updates the - // hash, and sets the ledger accepted and immutable. + // Used when we witnessed the consensus. assert (closed()); info_.closeTime = closeTime; diff --git a/src/ripple/app/ledger/impl/LedgerConsensusImp.cpp b/src/ripple/app/ledger/impl/LedgerConsensusImp.cpp index dd6e699577..b8a799e3c2 100644 --- a/src/ripple/app/ledger/impl/LedgerConsensusImp.cpp +++ b/src/ripple/app/ledger/impl/LedgerConsensusImp.cpp @@ -442,7 +442,7 @@ void LedgerConsensusImp::mapCompleteInternal ( auto it = mAcquired.find (hash); // If we have already acquired this transaction set - if (mAcquired.find (hash) != mAcquired.end ()) + if (it != mAcquired.end ()) { if (it->second) { @@ -595,13 +595,11 @@ void LedgerConsensusImp::checkLCL () JLOG (j_.warning) << ripple::getJson (*mPreviousLedger); - if (ShouldLog (lsDEBUG, LedgerConsensus)) + if (j_.debug) { for (auto& it : vals) - { - JLOG (j_.debug) + j_.debug << "V: " << it.first << ", " << it.second.first; - } } if (mHaveCorrectLCL) @@ -1641,7 +1639,7 @@ void LedgerConsensusImp::updateOurPositions () for (auto it = closeTimes.begin () , end = closeTimes.end (); it != end; ++it) { - JLOG (j_.debug) << "CCTime: seq" + JLOG (j_.debug) << "CCTime: seq " << mPreviousLedger->info().seq + 1 << ": " << it->first << " has " << it->second << ", " << threshVote << " required";