refactor: make active_chain_tip a reference#25677
Conversation
|
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. |
|
cc @MarcoFalke @dongcarl re #20750 (comment). |
|
ACK 9376a6d I'm guessing cuz the reference is |
I don't think any lifetimes change here, as passing a reference as a parameter is lifetime-wise identical to passing a pointer. Also, lifetimes shouldn't matter here, as the function does not return the reference/pointer or otherwise stores it in memory that survives past the return of the function. If you are asking whether a temporary can now be passed into the function: Then yes, this is now possible and legal C++ code. However for the purposes of our validation code creating a temporary is just as illegal as creating a copy, see #25311. |
9376a6d refactor: make active_chain_tip a reference (Aurèle Oulès) Pull request description: This PR fixes a TODO introduced in bitcoin#21055. Makes `active_chain_tip` argument in `CheckFinalTxAtTip` function a reference instead of a pointer. ACKs for top commit: dongcarl: ACK 9376a6d Tree-SHA512: c36d1769e0b9598b7f79334704b26b73e958d54caa3bd7e4eff954f3964fcf3f5e3a44a5a760497afad51b76e1614c86314fe035e4083c855e3574a620de7f4d
This PR fixes a TODO introduced in #21055.
Makes
active_chain_tipargument inCheckFinalTxAtTipfunction a reference instead of a pointer.