HomePhabricator

Merge #13162: [net] Don't incorrectly log that REJECT messages are unknown.

Description

Merge #13162: [net] Don't incorrectly log that REJECT messages are unknown.

Summary:
PR13162 backport https://github.com/bitcoin/bitcoin/pull/13162/files
fad63eb [logging] Don't incorrectly log that REJECT messages are unknown. (John Newbery)

Pull request description:

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
```

Test Plan:
make check
test_runner.py

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

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

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on May 7 2018, 10:45
Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>Committed on Aug 9 2019, 17:16
markblundebergPushed on Aug 9 2019, 17:16
Reviewer
Restricted Project
Differential Revision
D3837: Merge #13162: [net] Don't incorrectly log that REJECT messages are unknown.
Parents
rABCf78c08c106a5: Merge #13194: Remove template matching and pseudo opcodes
Branches
Unknown
Tags
Unknown