mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-18 08:32:30 +01:00
net_processing: additional debug logging for ignored messages
This commit is contained in:
@@ -2675,7 +2675,10 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
|||||||
const CNetMsgMaker msgMaker(pfrom.GetCommonVersion());
|
const CNetMsgMaker msgMaker(pfrom.GetCommonVersion());
|
||||||
|
|
||||||
if (msg_type == NetMsgType::VERACK) {
|
if (msg_type == NetMsgType::VERACK) {
|
||||||
if (pfrom.fSuccessfullyConnected) return;
|
if (pfrom.fSuccessfullyConnected) {
|
||||||
|
LogPrint(BCLog::NET, "ignoring redundant verack message from peer=%d\n", pfrom.GetId());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!pfrom.IsInboundConn()) {
|
if (!pfrom.IsInboundConn()) {
|
||||||
LogPrintf("New outbound peer connected: version: %d, blocks=%d, peer=%d%s (%s)\n",
|
LogPrintf("New outbound peer connected: version: %d, blocks=%d, peer=%d%s (%s)\n",
|
||||||
@@ -2756,7 +2759,11 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
|||||||
if (!State(pfrom.GetId())->m_wtxid_relay) {
|
if (!State(pfrom.GetId())->m_wtxid_relay) {
|
||||||
State(pfrom.GetId())->m_wtxid_relay = true;
|
State(pfrom.GetId())->m_wtxid_relay = true;
|
||||||
g_wtxid_relay_peers++;
|
g_wtxid_relay_peers++;
|
||||||
|
} else {
|
||||||
|
LogPrint(BCLog::NET, "ignoring duplicate wtxidrelay from peer=%d\n", pfrom.GetId());
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
LogPrint(BCLog::NET, "ignoring wtxidrelay due to old common version=%d from peer=%d\n", pfrom.GetCommonVersion(), pfrom.GetId());
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2792,6 +2799,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
|||||||
s >> vAddr;
|
s >> vAddr;
|
||||||
|
|
||||||
if (!pfrom.RelayAddrsWithConn()) {
|
if (!pfrom.RelayAddrsWithConn()) {
|
||||||
|
LogPrint(BCLog::NET, "ignoring %s message from %s peer=%d\n", msg_type, pfrom.ConnectionTypeAsString(), pfrom.GetId());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (vAddr.size() > MAX_ADDR_TO_SEND)
|
if (vAddr.size() > MAX_ADDR_TO_SEND)
|
||||||
|
|||||||
Reference in New Issue
Block a user