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.
[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
laanwj added the label P2P on May 3, 2018
MarcoFalke
commented at 5:48 PM on May 3, 2018:
member
utACKfad63ebe0f0db1e1d909064665be91ebd970bb0a
practicalswift
commented at 5:51 PM on May 3, 2018:
contributor
utACKfad63ebe0f0db1e1d909064665be91ebd970bb0a
Nice cleanup
laanwj
commented at 7:46 PM on May 3, 2018:
member
utACKfad63ebe0f0db1e1d909064665be91ebd970bb0a
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
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.
sdaftuar
commented at 4:20 PM on May 4, 2018:
member
ACK
Empact
commented at 4:57 PM on May 6, 2018:
member
utACKfad63eb
nit: would be nice to document the role of the return val
laanwj merged this on May 7, 2018
laanwj closed this on May 7, 2018
laanwj referenced this in commit a174702bad on May 7, 2018
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-05-20 06:55 UTC