-
Notifications
You must be signed in to change notification settings - Fork 37.6k
net: make CNode::m_inbound_onion public, initialize explicitly #21167
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: make CNode::m_inbound_onion public, initialize explicitly #21167
Conversation
and to allow the compiler to warn if uninitialized in the ctor or omitted in the caller.
nKeyedNetGroup(nKeyedNetGroupIn), | ||
id(idIn), | ||
nLocalHostNonce(nLocalHostNonceIn), | ||
m_conn_type(conn_type_in), | ||
nLocalServices(nLocalServicesIn), | ||
m_inbound_onion(inbound_onion) | ||
nLocalServices(nLocalServicesIn) |
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.
Argument order changed for -Wreorder
initialization order (in this case public members first, then private)
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. 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. |
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.
ACK 2ee4a7a
review ACK 2ee4a7a 🏀 Show signature and timestampSignature:
Timestamp of file with hash |
Summary: > net: make CNode::m_inbound_onion public, drop getter, update tests > net: remove CNode::m_inbound_onion defaults for explicitness > > and to allow the compiler to warn if uninitialized in the ctor > or omitted in the caller. This is a backport of [[bitcoin/bitcoin#21167 | core#21167]] Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D10973
Refactoring only, no change in behavior. This is a quick follow-up to #20210 to address these review comments:
Changes:
CNode::m_inbound_onion class
member public, update the Doxygen comment, drop the getter, and update the testsCNode::m_inbound_onion
default value initialization in the ctor declaration and the member initializer in favor of always passing it explicitly to the ctor where we initialize it dynamically, to both clarify the caller code and to allow the compiler to warn if it is uninitialized in the ctor or omitted in the caller