Needed to set mock times, and get wallet interface pointers correctly when
wallet code is running in a different process from node code.
https://github.com/bitcoin/bitcoin/pull/17999/commits/1dde238f2c21a0cc9bada10a2449cf9c6b2178ad
Partial backport of Core PR17999