[p2p] don't log tx invs when in IBD

These invs are ignored anyway, and this allows us to more easily move
the inv handling to TxDownloadManager in the next commit.
pull/30110/head
glozow 3 months ago
parent 288865338f
commit 58e09f244b

@ -4130,13 +4130,15 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
return;
}
const GenTxid gtxid = ToGenTxid(inv);
AddKnownTx(*peer, inv.hash);
if (!m_chainman.IsInitialBlockDownload()) {
const bool fAlreadyHave = m_txdownloadman.AlreadyHaveTx(gtxid, /*include_reconsiderable=*/true);
LogDebug(BCLog::NET, "got inv: %s %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom.GetId());
AddKnownTx(*peer, inv.hash);
if (!fAlreadyHave && !m_chainman.IsInitialBlockDownload()) {
if (!fAlreadyHave) {
AddTxAnnouncement(pfrom, gtxid, current_time);
}
}
} else {
LogDebug(BCLog::NET, "Unknown inv type \"%s\" received from peer=%d\n", inv.ToString(), pfrom.GetId());
}

Loading…
Cancel
Save