diff --git a/src/logging.h b/src/logging.h --- a/src/logging.h +++ b/src/logging.h @@ -57,6 +57,7 @@ QT = (1 << 19), LEVELDB = (1 << 20), VALIDATION = (1 << 21), + AVALANCHE = (1 << 22), ALL = ~uint32_t(0), }; diff --git a/src/logging.cpp b/src/logging.cpp --- a/src/logging.cpp +++ b/src/logging.cpp @@ -121,6 +121,7 @@ {BCLog::QT, "qt"}, {BCLog::LEVELDB, "leveldb"}, {BCLog::VALIDATION, "validation"}, + {BCLog::AVALANCHE, "avalanche"}, {BCLog::ALL, "1"}, {BCLog::ALL, "all"}, }; diff --git a/src/net_processing.cpp b/src/net_processing.cpp --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2820,7 +2820,7 @@ if (IsAvalancheMessageType(msg_type)) { if (!g_avalanche) { - LogPrint(BCLog::NET, + LogPrint(BCLog::AVALANCHE, "Avalanche is not initialized, ignoring %s message\n", msg_type); return; @@ -3081,7 +3081,7 @@ if ((pfrom.nServices & NODE_AVALANCHE) && g_avalanche && isAvalancheEnabled(gArgs)) { if (g_avalanche->sendHello(&pfrom)) { - LogPrint(BCLog::NET, "Send avahello to peer %d\n", + LogPrint(BCLog::AVALANCHE, "Send avahello to peer %d\n", pfrom.GetId()); auto localProof = g_avalanche->getLocalProof(); @@ -4240,7 +4240,7 @@ std::vector votes; votes.reserve(nCount); - LogPrint(BCLog::NET, "received avalanche poll from peer=%d\n", + LogPrint(BCLog::AVALANCHE, "received avalanche poll from peer=%d\n", pfrom.GetId()); { @@ -4366,8 +4366,7 @@ BlockValidationState state; if (!ActivateBestChain(config, state)) { - LogPrint(BCLog::NET, "failed to activate chain (%s)\n", - state.ToString()); + LogPrintf("failed to activate chain (%s)\n", state.ToString()); } } @@ -5770,7 +5769,8 @@ auto requestable = m_proofrequest.GetRequestable(pto->GetId(), current_time, &expired); for (const auto &entry : expired) { - LogPrint(BCLog::NET, "timeout of inflight proof %s from peer=%d\n", + LogPrint(BCLog::AVALANCHE, + "timeout of inflight proof %s from peer=%d\n", entry.second.ToString(), entry.first); } for (const auto &proofid : requestable) {