This PR fixes a TODO introduced in #21055.
Makes active_chain_tip argument in CheckFinalTxAtTip function a reference instead of a pointer.
This PR fixes a TODO introduced in #21055.
Makes active_chain_tip argument in CheckFinalTxAtTip function a reference instead of a pointer.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
CheckSequenceLocksAtTip() by hebasto)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 (review).
ACK 9376a6dae41022874df3b9302667796a9fb7b81d
I'm guessing cuz the reference is const it's getting lifetime extension?
I'm guessing cuz the reference is const it's getting lifetime extension?
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.