The lockpoints are not changed in this function.
There is no reason to pass a pointer.
Note for review: this is backported out of order after core#23683
This concludes backport of core#23649
https://github.com/bitcoin/bitcoin/pull/23649/commits/c4efc4db5484910ac33ba41aa76f4e23639d6f33
Depends on D12448