-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Revert "refactor: replace CConnman pointers by references in net_processing.cpp" #19542
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
Conversation
…essing.cpp" This reverts commit 0c8461a. In discussion in bitcoin#19174 there was a concept NACK by the original author of the code. It was merged after this without any further discussion.
|
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. |
|
We must also hold up those other PRs as long as this should maybe be reverted. Right now this is still a clean |
They could also be reset to the previous version, as this was the only conflict. (Assuming no other changes to the pulls in question happened in the meantime). As to the conceptual discussion, I think everyone agrees with @theuni that connman should be treated as an optional pointer. In current master, connman is a pointer (and it is not trivially possible to make it a non-pointer). Line 36 in c044858
Also, places where connman could be nullptr properly check for that. Lines 640 to 642 in c044858
However, the lines changed by the patch are called only where connman is already confirmed to be not null. If we go ahead to merge this, it would be good to document in the code or somewhere else why those cases should be treated as pointers and, at the same time, why nullptr checks are not needed for them. ACK 1aff21b for now. I only checked that it cleanly reverts, but ideally we'd have clear documentation on how to pass connman around and why. Sorry for causing this disagreement in the first place. I wish the time spent on this was used on user-facing changes, but properly documenting this will hopefully avoid misunderstandings in the future. |
|
Related discussion on IRC for reference: |
|
Concept NACK :p Looking in more detail now, it's clear that I jumped to an incorrect conclusion in #19174. My apologies to @theStack for a review so shallow it proved harmful. I'll make sure that future NACKs come with a more thorough review. I agree with @jnewbery's assessment here: #19174 (comment). As a note on process, I rather appreciate the way this worked out. Bad reviews should be called out as such (as @MarcoFalke and @jnewbery did), and worrisome merges should be pointed out for discussion (as @JeremyRubin did), even if ultimately no further action is taken. Though one might argue that I was so off-base on my argument that @MarcoFalke was right not to sit around and wait for me to figure it out :) Thanks to everyone for being reasonable. Sorry for the noise! |
This reverts commit 0c8461a.
In discussion in #19174 there was a concept NACK by the original author of the code. It was merged after this without any further discussion.