HomePhabricator

Cleanup of -debug=net log messages

Description

Cleanup of -debug=net log messages

Summary:

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

Some differences from the source material are due to segwit and out of order backports.

Backport of core#20724.

Ref T1696.

Test Plan:

ninja all check-extended

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Maniphest Tasks: T1696

Differential Revision: https://reviews.bitcoinabc.org/D10923

Details

Provenance
Anthony Towns <aj@erisian.com.au>Authored on Dec 17 2020, 21:18
FabienCommitted on Jan 28 2022, 11:19
FabienPushed on Jan 28 2022, 11:19
Reviewer
Restricted Project
Differential Revision
D10923: Cleanup of -debug=net log messages
Parents
rABC8ee3efcb12e9: Remove unused access to addpeeraddress RPC output dict element
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task

Event Timeline

Fabien added a task: Restricted Maniphest Task.