mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-09 15:18:03 +02:00
log: fix minor formatting in debug logs
Tidy a few debug log strings to avoid double spaces, concatenated status words, and mismatched format specifiers. Co-authored-by: naiyoma <lankas.aurelia@gmail.com>
This commit is contained in:
@@ -2851,8 +2851,8 @@ void PeerManagerImpl::HeadersDirectFetchBlocks(CNode& pfrom, const Peer& peer, c
|
||||
uint32_t nFetchFlags = GetFetchFlags(peer);
|
||||
vGetData.emplace_back(MSG_BLOCK | nFetchFlags, pindex->GetBlockHash());
|
||||
BlockRequested(pfrom.GetId(), *pindex);
|
||||
LogDebug(BCLog::NET, "Requesting block %s from peer=%d\n",
|
||||
pindex->GetBlockHash().ToString(), pfrom.GetId());
|
||||
LogDebug(BCLog::NET, "Requesting block %s from peer=%d",
|
||||
pindex->GetBlockHash().ToString(), pfrom.GetId());
|
||||
}
|
||||
if (vGetData.size() > 1) {
|
||||
LogDebug(BCLog::NET, "Downloading blocks toward %s (%d) via headers direct fetch\n",
|
||||
@@ -3799,7 +3799,7 @@ void PeerManagerImpl::ProcessMessage(Peer& peer, CNode& pfrom, const std::string
|
||||
|
||||
auto new_peer_msg = [&]() {
|
||||
const auto mapped_as{m_connman.GetMappedAS(pfrom.addr)};
|
||||
return strprintf("New %s peer connected: transport: %s, version: %d, blocks=%d peer=%d%s%s\n",
|
||||
return strprintf("New %s peer connected: transport: %s, version: %d, blocks=%d, peer=%d%s%s",
|
||||
pfrom.ConnectionTypeAsString(),
|
||||
TransportTypeAsString(pfrom.m_transport->GetInfo().transport_type),
|
||||
pfrom.nVersion.load(), peer.m_starting_height,
|
||||
@@ -4125,7 +4125,7 @@ void PeerManagerImpl::ProcessMessage(Peer& peer, CNode& pfrom, const std::string
|
||||
|
||||
if (inv.IsMsgBlk()) {
|
||||
const bool fAlreadyHave = AlreadyHaveBlock(inv.hash);
|
||||
LogDebug(BCLog::NET, "got inv: %s %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom.GetId());
|
||||
LogDebug(BCLog::NET, "got inv: %s %s peer=%d", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom.GetId());
|
||||
|
||||
UpdateBlockAvailability(pfrom.GetId(), inv.hash);
|
||||
if (!fAlreadyHave && !m_chainman.m_blockman.LoadingBlocks() && !IsBlockRequested(inv.hash)) {
|
||||
@@ -4148,7 +4148,7 @@ void PeerManagerImpl::ProcessMessage(Peer& peer, CNode& pfrom, const std::string
|
||||
|
||||
if (!m_chainman.IsInitialBlockDownload()) {
|
||||
const bool fAlreadyHave{m_txdownloadman.AddTxAnnouncement(pfrom.GetId(), gtxid, current_time)};
|
||||
LogDebug(BCLog::NET, "got inv: %s %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom.GetId());
|
||||
LogDebug(BCLog::NET, "got inv: %s %s peer=%d", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom.GetId());
|
||||
}
|
||||
} else {
|
||||
LogDebug(BCLog::NET, "Unknown inv type \"%s\" received from peer=%d\n", inv.ToString(), pfrom.GetId());
|
||||
@@ -4281,7 +4281,7 @@ void PeerManagerImpl::ProcessMessage(Peer& peer, CNode& pfrom, const std::string
|
||||
{
|
||||
if (pindex->GetBlockHash() == hashStop)
|
||||
{
|
||||
LogDebug(BCLog::NET, " getblocks stopping at %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString());
|
||||
LogDebug(BCLog::NET, " getblocks stopping at %d %s", pindex->nHeight, pindex->GetBlockHash().ToString());
|
||||
break;
|
||||
}
|
||||
// If pruning, don't inv blocks unless we have on disk and are likely to still have
|
||||
@@ -4295,7 +4295,7 @@ void PeerManagerImpl::ProcessMessage(Peer& peer, CNode& pfrom, const std::string
|
||||
if (--nLimit <= 0) {
|
||||
// When this block is requested, we'll send an inv that'll
|
||||
// trigger the peer to getblocks the next batch of inventory.
|
||||
LogDebug(BCLog::NET, " getblocks stopping at limit %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString());
|
||||
LogDebug(BCLog::NET, " getblocks stopping at limit %d %s", pindex->nHeight, pindex->GetBlockHash().ToString());
|
||||
WITH_LOCK(peer.m_block_inv_mutex, {peer.m_continuation_block = pindex->GetBlockHash();});
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user