For the purpose of this test the two have the same outcome, but this one
is shorter and avoids a sleep for 0.1 seconds.
This is a backport of Core PR18742 [2/3]
https://github.com/bitcoin/bitcoin/pull/18742/commits/fa5ceb25fce2200edf6b8ebfa6d4f01ed6774b95
Depends on D9103