Functions no longer used.
Partial backport of Core PR13825
https://github.com/bitcoin/bitcoin/pull/13825/commits/e6fcc5d39675aced61b4abc25b7d04f398e32318
https://github.com/bitcoin/bitcoin/pull/13825/commits/7a0d8f49b3e2fc8e497e9b41b251cd2c861a6640
Depends on D5316