[net] Don’t incorrectly log that REJECT messages are unknown. #13162

pull jnewbery wants to merge 1 commits into bitcoin:master from jnewbery:fix_reject_logging changing 1 files +1 −0
  1. jnewbery commented at 5:42 pm on May 3, 2018: member

    Reject messages are logged to debug.log if NET debug logging is enabled.

    Because of the way the ProcessMessages() function is structured, processing for REJECT messages will also drop through to the default branch and incorrectly log Unknown command "reject" from peer-?. Fix that by exiting from ProcessMessages() early.

    without this PR:

    02018-05-03T17:37:00.930600Z received: reject (21 bytes) peer=0
    12018-05-03T17:37:00.930620Z Reject message code 16: spammy spam
    22018-05-03T17:37:00.930656Z Unknown command "reject" from peer=0
    

    with this PR:

    02018-05-03T17:35:04.751246Z received: reject (21 bytes) peer=0
    12018-05-03T17:35:04.751274Z Reject message code 16: spammy spam
    
  2. [logging] Don't incorrectly log that REJECT messages are unknown.
    Reject messages are logged to debug.log if NET debug logging is enabled.
    
    Because of the way the `ProcessMessages()` function is structured,
    processing for REJECT messages will also drop through to the default
    branch and incorrectly log `Unknown command "reject" from peer-?`. Fix
    that by exiting from `ProcessMessages()` early.
    
    without this PR:
    ```
    2018-05-03T17:37:00.930600Z received: reject (21 bytes) peer=0
    2018-05-03T17:37:00.930620Z Reject message code 16: spammy spam
    2018-05-03T17:37:00.930656Z Unknown command "reject" from peer=0
    ```
    with this PR:
    ```
    2018-05-03T17:35:04.751246Z received: reject (21 bytes) peer=0
    2018-05-03T17:35:04.751274Z Reject message code 16: spammy spam
    ```
    fad63ebe0f
  3. laanwj added the label P2P on May 3, 2018
  4. MarcoFalke commented at 5:48 pm on May 3, 2018: member
    utACK fad63ebe0f0db1e1d909064665be91ebd970bb0a
  5. practicalswift commented at 5:51 pm on May 3, 2018: contributor

    utACK fad63ebe0f0db1e1d909064665be91ebd970bb0a

    Nice cleanup

  6. laanwj commented at 7:46 pm on May 3, 2018: member
    utACK fad63ebe0f0db1e1d909064665be91ebd970bb0a
  7. MarcoFalke renamed this:
    [logging] Don't incorrectly log that REJECT messages are unknown.
    [net] Don't incorrectly log that REJECT messages are unknown.
    on May 3, 2018
  8. MarcoFalke commented at 9:06 pm on May 3, 2018: member
    Changed label to [net], since this reworks the control flow and fixes the logging as side effect.
  9. sdaftuar commented at 4:20 pm on May 4, 2018: member
    ACK
  10. Empact commented at 4:57 pm on May 6, 2018: member
    utACK fad63eb nit: would be nice to document the role of the return val
  11. laanwj merged this on May 7, 2018
  12. laanwj closed this on May 7, 2018

  13. laanwj referenced this in commit a174702bad on May 7, 2018
  14. jnewbery deleted the branch on Aug 24, 2018
  15. laanwj referenced this in commit 021dce935a on Aug 25, 2018
  16. PastaPastaPasta referenced this in commit c261173669 on Jan 25, 2020
  17. UdjinM6 referenced this in commit 0ab00ec12f on Jan 28, 2020
  18. PastaPastaPasta referenced this in commit 5cc46c34ca on Jan 28, 2020
  19. UdjinM6 referenced this in commit 31066138c0 on Jan 31, 2020
  20. UdjinM6 referenced this in commit d22cd7da9a on Jan 31, 2020
  21. UdjinM6 referenced this in commit e5e3572e9d on Feb 3, 2020
  22. UdjinM6 referenced this in commit 8d5fc6e0ab on Feb 3, 2020
  23. MIPPL referenced this in commit 3311e33aa0 on May 15, 2020
  24. FornaxA referenced this in commit fa74145cee on Jul 6, 2020
  25. FornaxA referenced this in commit e49789232c on Jul 6, 2020
  26. ckti referenced this in commit 77002d0909 on Mar 28, 2021
  27. MarcoFalke 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: 2024-11-17 18:12 UTC

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