mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 07:39:08 +01:00
[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.
This commit is contained in:
@@ -4130,12 +4130,14 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
return;
|
||||
}
|
||||
const GenTxid gtxid = ToGenTxid(inv);
|
||||
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()) {
|
||||
AddTxAnnouncement(pfrom, gtxid, current_time);
|
||||
|
||||
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());
|
||||
if (!fAlreadyHave) {
|
||||
AddTxAnnouncement(pfrom, gtxid, current_time);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LogDebug(BCLog::NET, "Unknown inv type \"%s\" received from peer=%d\n", inv.ToString(), pfrom.GetId());
|
||||
|
||||
Reference in New Issue
Block a user