Repository navigation
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34293. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
Trying to test this but in my logs I don't see a |
l0rinc
left a comment
There was a problem hiding this comment.
code review ACK 9e689f5cb5271c668610cf9cd21ba04cc8a755b4
…dr in "receive version message" and "New ___ peer connected" Versions prior to 29.x all included a comma here, and the general format of the message still includes commas between all other fields
9e689f5 to
ffd09f8
Compare
|
|
ACK ffd09f8 This does fix an existing issue introduced in https://github.com/bitcoin/bitcoin/pull/28521/changes#diff-6875de769e90cec84d2e8a9c1b962cdbcda44d870d42e4215827e599e11e90e3L3570. |
|
Note that this only fixes 2 occurrences, but there's an alternative where I've adjusted them in a more systematic way, see: #34389 |
|
🐙 This pull request conflicts with the target branch and needs rebase. |
|
@luke-jr are you going to rebase this? |
…eer` 2233547 net: format peer+addr logs with `LogPeer` (Lőrinc) e55ea53 test: add pre-`LogPeer` net log assertion (Lőrinc) 736b17c log: fix minor formatting in debug logs (Lőrinc) 9cf82be log: show placeholders for missing peer fields (Lőrinc) Pull request description: This is an alternative to #34293, but aims to address the remaining logging inconsistencies more broadly. It extends the example fixed there to every instance, restores the original separator behavior, applies it consistently via a single helper, and adds tests for `logips` (covering both current and new behavior). ### Problem After #28521 centralized peer address logging into `CNode::LogIP()`, the original comma separator before `peeraddr=` was lost, resulting in inconsistent formatting across net (and recent private broadcast) logs. Some lines also had double spaces, empty fields, or mismatched format specifiers. ### Fix Introduces `CNode::LogPeer(bool)` which always emits `peer=<id>` and, when `-logips=1`, appends `, peeraddr=<addr>`. This eliminates hand-rolled separators and makes peer identification predictable. Minor issues (double spaces, empty placeholders, format specifiers) are fixed along the way in separate commits. ### Reproducer Run with `-debug=net -logips=1` and observe peer log lines now show `peer=<id>, peeraddr=<addr>` (comma-separated). The new assertion in `feature_logging.py` automates this check. ACKs for top commit: naiyoma: ACK 2233547 vasild: ACK 2233547 sedited: ACK 2233547 Tree-SHA512: 562262a58c3042f139099ff4c41e3fc6a97505fe9603c2bf700a97fd0aa052954b47c14da0e50c1fc311db1ae6c04e6a92156c9b85e25c777a637b7766c1dafe
|
This has been done as part of #34389. |
Versions prior to 29.x all included a comma here, and the general format of the message still includes commas between all other fields