A repeating pattern in the functional tests is that the test sleeps for a while to ensure that a certain condition is still true after some amount of time has elapsed. This PR here introduces an ensure helper to streamline this functionality.
Remove unused attempts parameter from wait_until
This is a partial backport of core#30893
https://github.com/bitcoin/bitcoin/pull/30893/commits/16c87d91fd4d7709fa9d8824d5b641ef71821931
https://github.com/bitcoin/bitcoin/pull/30893/commits/111465d72dd35e42361fc2a089036f652417ed37
For now there is no use case for the 3rd commit in that PR (check_interval parameter for wait_until)