-
Notifications
You must be signed in to change notification settings - Fork 37.8k
refactor: CheckFinalTx pass by reference instead of pointer #22282
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
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.
Code-review ACK 10caa3e 🥥
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 10caa3e
Concept ACK Candidates for similar treatment can be found using the |
Thanks for informing me be about this. Added a comment on the issue to reference this PR. However, I think I will keep the scope of this PR to |
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. |
{ | ||
AssertLockHeld(cs_main); | ||
assert(active_chain_tip); // TODO: Make active_chain_tip a reference |
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.
This removes an assertion and turns a (theoretical) crash into UB
🐙 This pull request conflicts with the target branch and needs rebase. Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft". |
Closing this PR as this refactor will remove an assertion. |
As long as you preserve the assertion, it should be ok. |
Rationale This PR fixes TODO from #21055
bitcoin/src/validation.cpp
Line 183 in 965e937
#20750 (comment) for additional information.
Changes to
CheckFinalTx
:active_chain_tip
to be passed by reference instead of pointer and shift&
oftx
to be left-attaching