I also removed all the includes that are now flagged as unused by my IDE in the source file. And a unit test was renamed during the move. Otherwise, there is no change in the code.
This is a partial backport of core#23381
https://github.com/bitcoin/bitcoin/pull/23381/commits/68763783658f004efd9117fa7a69b0e271c4eaaa
Depends on D12360