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.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
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.
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.