You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
48c8a9b net_processing: log txrelay flag from version message (Anthony Towns)
98fab37 net: use peer=N instead of from=N in debug log (Anthony Towns)
1230210 net_processing: additional debug logging for ignored messages (Anthony Towns)
f7edea3 net: make debug logging conditional on -debug=net (Anthony Towns)
a410ae8 net, net_processing: log disconnect reasons with -debug=net (Anthony Towns)
Pull request description:
A few changes to -debug=net logging:
* always log when disconnecting a peer
* only log various connection errors when -debug=net is enabled, since errors from random untrusted peers is completely expected
* log when ignoring a message due to violating protocol (primarily to make it easier to debug other implementations)
* use "peer=123" rather than "from 123" to make grepping logs a bit easier
* log the value of the bip-37 `fRelay` field in version messages both when sending and receiving a version message
ACKs for top commit:
jnewbery:
ACK 48c8a9b
MarcoFalke:
re-ACK 48c8a9b only change is rebase 🚓
practicalswift:
re-ACK 48c8a9b
Tree-SHA512: 6ac530d883dffc4fd7fe20b1dc5ebb5394374c9b499aa7a253eb4a3a660d8901edd72e5ad21ce4a2bf71df25e8f142087755f9756f3497f564ef453a7e9246c1
LogPrint(BCLog::NET, "socket no message in first %i seconds, %d %d from %d\n", m_peer_connect_timeout, node.nLastRecv != 0, node.nLastSend != 0, node.GetId());
1234
+
LogPrint(BCLog::NET, "socket no message in first %i seconds, %d %d peer=%d\n", m_peer_connect_timeout, node.nLastRecv != 0, node.nLastSend != 0, node.GetId());
1234
1235
returntrue;
1235
1236
}
1236
1237
1237
1238
if (now > node.nLastSend + TIMEOUT_INTERVAL) {
1238
-
LogPrintf("socket sending timeout: %is\n", now - node.nLastSend);
1239
+
LogPrint(BCLog::NET, "socket sending timeout: %is peer=%d\n", now - node.nLastSend, node.GetId());
1239
1240
returntrue;
1240
1241
}
1241
1242
1242
1243
if (now > node.nLastRecv + TIMEOUT_INTERVAL) {
1243
-
LogPrintf("socket receive timeout: %is\n", now - node.nLastRecv);
1244
+
LogPrint(BCLog::NET, "socket receive timeout: %is peer=%d\n", now - node.nLastRecv, node.GetId());
1244
1245
returntrue;
1245
1246
}
1246
1247
1247
1248
if (node.nPingNonceSent && node.m_ping_start.load() + std::chrono::seconds{TIMEOUT_INTERVAL} < GetTime<std::chrono::microseconds>()) {
1248
1249
// We use mockable time for ping timeouts. This means that setmocktime
1249
1250
// may cause pings to time out for peers that have been connected for
0 commit comments