Also pass in a (for now unused) reference to the params.
Both changes are needed for the next commit.
This is a partial backport of [[https://github.com/bitcoin/bitcoin/pull/25648 | core#25648]]
https://github.com/bitcoin/bitcoin/pull/25648/commits/fa468bdfb62dec286cb977db78d3e47b64dafeba