mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-18 16:42:54 +01:00
As pointed out by Sjors in https://github.com/bitcoin/bitcoin/pull/34003#discussion_r2598844209 and https://github.com/bitcoin/bitcoin/pull/34003#discussion_r2598858386 the original intention of having waitNext and waitTipChanged calls in the test was to ensure that if new blocks were connected or fees were increased *during* the waits, that the calls would wake up and return. But the tests were written incorrectly, to generate blocks and transactions before the wait calls instead of during the calls. So the tests were less meaningful then they should be. There was also a similar problem in the interruptWait test. The test was intended to test the interruptWait method, but it was never actually calling the method due to a missing await keyword. Instead it was testing that miniwallet.send_self_transfer would interrupt the wait. This commit fixes these issues by introducing a wait_and_do() helper function to start parallel tasks and trigger an action after a wait call is started. Co-authored-by: Sjors Provoost <sjors@sprovoost.nl>
15 KiB
Executable File
15 KiB
Executable File