The test has many issues:
- It fails intermittently, due to the use of
-stopatheight(https://github.com/bitcoin/bitcoin/issues/33635) - Using
-stopatheightis expensive, because it requires two restarts, making the test slow
Fix all issues by using dumb_sync_blocks and avoid the two restarts.
Fixes #33635
Diff to test:
diff --git a/src/util/tokenpipe.cpp b/src/util/tokenpipe.cpp
index c982fa6fc4..1dc12ea1d5 100644
--- a/src/util/tokenpipe.cpp
+++ b/src/util/tokenpipe.cpp
@@ -4,2 +4,3 @@
#include <util/tokenpipe.h>
+#include <util/time.h>
@@ -60,2 +61,3 @@ int TokenPipeEnd::TokenRead()
ssize_t result = read(m_fd, &token, 1);
+ UninterruptibleSleep(999ms);
if (result < 0) {
On master: Test fails On this pull: Test passes