This completes the backport of Core [[https://github.com/bitcoin/bitcoin/pull/19219 | PR19219]], the last commit being delayed due to missing
dependant backports.
https://github.com/bitcoin/bitcoin/pull/19219/commits/2ad58381fffb33d611abf900b73d9e6b5a4e35f8