Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: Use log categories when logging events that P2P peers can trigger arbitrarily #17828

Open
wants to merge 1 commit into
base: master
from

Conversation

@practicalswift
Copy link
Member

practicalswift commented Dec 29, 2019

Use log categories when logging events that P2P peers can trigger arbitrarily.

Rationale similar to that of PR #17762 (net: Log to net category for exceptions in ProcessMessages):

It is not good to panick end users with verbose errors (let alone writing to stderr) when any peer can generate them.

@hebasto

This comment has been minimized.

Copy link
Member

hebasto commented Dec 29, 2019

Concept ACK.

@DrahtBot

This comment has been minimized.

Copy link
Contributor

DrahtBot commented Dec 30, 2019

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #17479 (Return BlockValidationState from ProcessNewBlock if CheckBlock/AcceptBlock fails by jnewbery)

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.

Copy link
Member

promag left a comment

Concept ACK. nit, error_debug() looks strange to me.

src/util/system.h Outdated Show resolved Hide resolved
@practicalswift

This comment has been minimized.

Copy link
Member Author

practicalswift commented Jan 2, 2020

@promag I agree the name does not feel perfect. Have any suggestions w.r.t. naming? :) I'm trying to mimic bool error(…). Perhaps bool error_with_category(…) or bool error_with_debug(…)?

luke-jr added a commit to bitcoinknots/bitcoin that referenced this pull request Jan 5, 2020
@practicalswift practicalswift force-pushed the practicalswift:log-categories branch from e148126 to 594f17d Jan 8, 2020
@practicalswift

This comment has been minimized.

Copy link
Member Author

practicalswift commented Jan 8, 2020

Now using error_with_debug_log(…) instead of error_debug(…).

Please re-review :)

@practicalswift practicalswift force-pushed the practicalswift:log-categories branch from 594f17d to 443e105 Jan 10, 2020
@practicalswift

This comment has been minimized.

Copy link
Member Author

practicalswift commented Jan 10, 2020

Rebased! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.