Skip to content

Commit 1230210

Browse files
committed
net_processing: additional debug logging for ignored messages
1 parent f7edea3 commit 1230210

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/net_processing.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2675,7 +2675,10 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
26752675
const CNetMsgMaker msgMaker(pfrom.GetCommonVersion());
26762676

26772677
if (msg_type == NetMsgType::VERACK) {
2678-
if (pfrom.fSuccessfullyConnected) return;
2678+
if (pfrom.fSuccessfullyConnected) {
2679+
LogPrint(BCLog::NET, "ignoring redundant verack message from peer=%d\n", pfrom.GetId());
2680+
return;
2681+
}
26792682

26802683
if (!pfrom.IsInboundConn()) {
26812684
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,
27562759
if (!State(pfrom.GetId())->m_wtxid_relay) {
27572760
State(pfrom.GetId())->m_wtxid_relay = true;
27582761
g_wtxid_relay_peers++;
2762+
} else {
2763+
LogPrint(BCLog::NET, "ignoring duplicate wtxidrelay from peer=%d\n", pfrom.GetId());
27592764
}
2765+
} else {
2766+
LogPrint(BCLog::NET, "ignoring wtxidrelay due to old common version=%d from peer=%d\n", pfrom.GetCommonVersion(), pfrom.GetId());
27602767
}
27612768
return;
27622769
}
@@ -2792,6 +2799,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
27922799
s >> vAddr;
27932800

27942801
if (!pfrom.RelayAddrsWithConn()) {
2802+
LogPrint(BCLog::NET, "ignoring %s message from %s peer=%d\n", msg_type, pfrom.ConnectionTypeAsString(), pfrom.GetId());
27952803
return;
27962804
}
27972805
if (vAddr.size() > MAX_ADDR_TO_SEND)

0 commit comments

Comments
 (0)