diff options
author | Anthony Towns <aj@erisian.com.au> | 2020-12-18 07:40:56 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2021-01-28 16:04:04 +1000 |
commit | 12302105bb0bf14721e91b7a3a9d1bf83c8d4154 (patch) | |
tree | f019430d9c6cf4c3b141c9e9ff523baccdb52c5c /src | |
parent | f7edea3b7c873d6c9bcd50cf528349ef84961a75 (diff) | |
download | bitcoin-12302105bb0bf14721e91b7a3a9d1bf83c8d4154.tar.xz |
net_processing: additional debug logging for ignored messages
Diffstat (limited to 'src')
-rw-r--r-- | src/net_processing.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 3bf0de88e3..872d30b501 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2675,7 +2675,10 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type, const CNetMsgMaker msgMaker(pfrom.GetCommonVersion()); 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()) { 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) { State(pfrom.GetId())->m_wtxid_relay = true; 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; } @@ -2792,6 +2799,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type, s >> vAddr; if (!pfrom.RelayAddrsWithConn()) { + LogPrint(BCLog::NET, "ignoring %s message from %s peer=%d\n", msg_type, pfrom.ConnectionTypeAsString(), pfrom.GetId()); return; } if (vAddr.size() > MAX_ADDR_TO_SEND) |