Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyone knows why
prettyPrintPeerId
only prints out the first 2 characters? Those seem to be always 16 , e.g.peer=16...LaZW3U
.I saw users wonder why peer 16 is always disconnecting 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that's a good question. For this context I suppose we should print the whole peer id as it's for developer, not for user. We can ask other client for a specific peer id for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this from warn to debug will solve most of the confusion for users as most do not look at debug logs. We are using
prettyPrintPeerId
all over the place in peer manager, maybe could print first 4 characters instead of just 2.Not sure how they would look up the peer id but would assume if it just based on searching the logs it should even be sufficient to just have the truncated peer id.
Anyways, changes on how we want to log the peer ids should probably be addressed in another PR.