The common setup is included in virtually all tests, so it should be
as slim as possible.
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/19090 | core#19090]] [2/7]
https://github.com/bitcoin/bitcoin/pull/19090/commits/fa9819695aac260be0ba170eb15ecba8cb519843