net: Move misbehaving logging to net logging category #12218

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2018_01_misbehaving_logging changing 2 files +23 −24
  1. laanwj commented at 4:26 PM on January 18, 2018: member

    This moves the error messages for misbehavior (when available) into the line that reports the misbehavior, as well as moves the logging to the net category.

    This is a continuation of #11583 and avoids serious-looking errors due to misbehaving peers. As it is impossible to correlate the peer=X numbers to specific incoming connections now without enabling the net category, it doesn't really help to see these messages by default.

    To do this, Misbehaving() gains an optional message argument.

    E.g. change:

    2018-01-18 16:02:27 Misbehaving: x.x.x.x:62174 peer=164603 (80 -> 100) BAN THRESHOLD EXCEEDED
    2018-01-18 16:02:27 ERROR: non-continuous headers sequence

    to

    2018-01-18 16:02:27 Misbehaving: x.x.x.x:62174 peer=164603 (80 -> 100) BAN THRESHOLD EXCEEDED: non-continuous headers sequence

    When there is a category for "important" net messages (see #12219 ), we should move it there.

  2. laanwj added the label P2P on Jan 18, 2018
  3. laanwj added the label Utils/log/libs on Jan 18, 2018
  4. net: Move misbehaving logging to net logging category
    This moves the error messages for misbehavior (when available) into the
    line that reports the misbehavior, as well as moves the logging to the
    `net` category.
    
    This is a continuation of #11583 and avoids serious-looking errors due
    to misbehaving peers.
    
    To do this, Misbehaving() gains an optional `message` argument.
    
    E.g. change:
    
        2018-01-18 16:02:27 Misbehaving: x.x.x.x:62174 peer=164603 (80 -> 100) BAN THRESHOLD EXCEEDED
        2018-01-18 16:02:27 ERROR: non-continuous headers sequence
    
    to
    
        2018-01-18 16:02:27 Misbehaving: x.x.x.x:62174 peer=164603 (80 -> 100) BAN THRESHOLD EXCEEDED: non-continuous headers sequence
    d3a185a33b
  5. laanwj force-pushed on Jan 24, 2018
  6. kallewoof commented at 11:16 PM on January 24, 2018: member

    Tested ACK. Still lots of spam but better than before. (Last page of my debug.log: https://pastebin.com/2VJHnZn2)

  7. gmaxwell commented at 11:26 AM on February 4, 2018: contributor

    ACK

  8. laanwj merged this on Feb 6, 2018
  9. laanwj closed this on Feb 6, 2018

  10. laanwj referenced this in commit 9a32114626 on Feb 6, 2018
  11. PastaPastaPasta referenced this in commit 3564993bcb on Jan 26, 2020
  12. PastaPastaPasta referenced this in commit 49549390af on Jan 27, 2020
  13. ckti referenced this in commit 06219ebcd0 on Mar 28, 2021
  14. random-zebra referenced this in commit b4751e10ce on Aug 11, 2021
  15. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me