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