Permalink
Browse files

New debug category checkpoint

Keep the log cleaner, unless you care about checkpoints.
  • Loading branch information...
Tranz5 committed Oct 15, 2014
1 parent 6984a4f commit f5d7f667f3cf99fe2bf7b7eee485c2a05e24427a
Showing with 7 additions and 4 deletions.
  1. +6 −3 src/checkpoints.cpp
  2. +1 −1 src/init.cpp
@@ -186,7 +186,7 @@ namespace Checkpoints
hashPendingCheckpoint = 0;
checkpointMessage = checkpointMessagePending;
checkpointMessagePending.SetNull();
LogPrintf("AcceptPendingSyncCheckpoint : sync-checkpoint at %s\n", hashSyncCheckpoint.ToString());
LogPrint("checkpoint", "AcceptPendingSyncCheckpoint : sync-checkpoint at %s\n", hashSyncCheckpoint.ToString());
// relay the checkpoint
if (!checkpointMessage.IsNull())
{
@@ -407,10 +407,13 @@ bool CSyncCheckpoint::ProcessSyncCheckpoint(CNode* pfrom)
LOCK(Checkpoints::cs_hashSyncCheckpoint);
if (!mapBlockIndex.count(hashCheckpoint))
{
if (Checkpoints::hashPendingCheckpoint != hashCheckpoint) {
// Only log this message once, we don't need to see it from every peer
LogPrint("checkpoint", "ProcessSyncCheckpoint: pending for sync-checkpoint %s\n", hashCheckpoint.ToString());
}
// We haven't received the checkpoint chain, keep the checkpoint as pending
Checkpoints::hashPendingCheckpoint = hashCheckpoint;
Checkpoints::checkpointMessagePending = *this;
LogPrintf("ProcessSyncCheckpoint: pending for sync-checkpoint %s\n", hashCheckpoint.ToString());
// Ask this guy to fill in what we're missing
if (pfrom)
{
@@ -449,6 +452,6 @@ bool CSyncCheckpoint::ProcessSyncCheckpoint(CNode* pfrom)
Checkpoints::checkpointMessage = *this;
Checkpoints::hashPendingCheckpoint = 0;
Checkpoints::checkpointMessagePending.SetNull();
LogPrintf("ProcessSyncCheckpoint: sync-checkpoint at %s\n", hashCheckpoint.ToString());
LogPrint("checkpoint", "ProcessSyncCheckpoint: sync-checkpoint at %s\n", hashCheckpoint.ToString());
return true;
}
@@ -285,7 +285,7 @@ std::string HelpMessage()
strUsage += " " + _("If <category> is not supplied, output all debugging information.") + "\n";
strUsage += " " + _("<category> can be:");
strUsage += " addrman, alert, db, lock, rand, rpc, selectcoins, mempool, net, keypool,";
strUsage += " coinage, coinstake, creation, stakemodifier, stakechecksum, priority";
strUsage += " coinage, coinstake, creation, checkpoint, stakemodifier, stakechecksum, priority";
if (fHaveGUI)
strUsage += ", qt.\n";
else

0 comments on commit f5d7f66

Please sign in to comment.