From 470e2c5747468ccc8ab38e61d8c7fb456435cbf2 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 8 Oct 2012 00:49:55 -0700 Subject: [PATCH] Fixups. --- src/LedgerConsensus.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/LedgerConsensus.cpp b/src/LedgerConsensus.cpp index de92f57208..2c3679168a 100644 --- a/src/LedgerConsensus.cpp +++ b/src/LedgerConsensus.cpp @@ -417,8 +417,7 @@ void LedgerConsensus::createDisputes(SHAMap::ref m1, SHAMap::ref m2) void LedgerConsensus::mapComplete(const uint256& hash, SHAMap::ref map, bool acquired) { - if (acquired) - cLog(lsINFO) << "We have acquired TXS " << hash; + tLog(acquired, lsINFO) << "We have acquired TXS " << hash; if (!map) { // this is an invalid/corrupt map @@ -458,8 +457,7 @@ void LedgerConsensus::mapComplete(const uint256& hash, SHAMap::ref map, bool acq } if (!peers.empty()) adjustCount(map, peers); - else if (acquired) - cLog(lsWARNING) << "By the time we got the map " << hash << " no peers were proposing it"; + else tLog(acquired, lsWARNING) << "By the time we got the map " << hash << " no peers were proposing it"; sendHaveTxSet(hash, true); } @@ -547,8 +545,7 @@ void LedgerConsensus::stateEstablish() updateOurPositions(); if (!mHaveCloseTimeConsensus) { - if (haveConsensus()) - cLog(lsINFO) << "We have TX consensus but not CT consensus"; + tLog(haveConsensus(), lsINFO) << "We have TX consensus but not CT consensus"; } else if (haveConsensus()) { @@ -681,9 +678,8 @@ void LedgerConsensus::updateOurPositions() thresh = it->second; } } - if (!mHaveCloseTimeConsensus) - cLog(lsDEBUG) << "No CT consensus: Proposers:" << mPeerPositions.size() << " Proposing:" << - (mProposing ? "yes" : "no") << " Thresh:" << thresh << " Pos:" << closeTime; + tLog(!mHaveCloseTimeConsensus, lsDEBUG) << "No CT consensus: Proposers:" << mPeerPositions.size() + << " Proposing:" << (mProposing ? "yes" : "no") << " Thresh:" << thresh << " Pos:" << closeTime; } if ((!changes) &&