This commit does not change behavior. All it does is pass new function
parameters.
Partial backport of core [[https://github.com/bitcoin/bitcoin/pull/14437/files | PR14437]]::
https://github.com/bitcoin/bitcoin/pull/14437/commits/081accb875412f38718f2e40ed7bbdf15e6f4ef8
Depends on D5075.