Small fixups that fell through. See the commit messages for details.
Can be tested via:
0diff --git a/src/util/thread.cpp b/src/util/thread.cpp
1index 0fde73c..4fcfe4f 100644
2--- a/src/util/thread.cpp
3+++ b/src/util/thread.cpp
4@@ -8,2 +8,3 @@
5 #include <util/log.h>
6+#include <util/time.h>
7 #include <util/threadnames.h>
8@@ -18,2 +19,3 @@ void util::TraceThread(std::string_view thread_name, std::function<void()> threa
9 util::ThreadRename(std::string{thread_name});
10+ UninterruptibleSleep(999ms);
11 try {
12diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp
13index c7be6ab..3237aec 100644
14--- a/src/validationinterface.cpp
15+++ b/src/validationinterface.cpp
16@@ -14,2 +14,3 @@
17 #include <primitives/transaction.h>
18+#include <random.h>
19 #include <util/check.h>
20@@ -156,2 +157,4 @@ void ValidationSignals::SyncWithValidationInterfaceQueue()
21
22+static FastRandomContext g_rnd{};
23+
24 // Use a macro instead of a function for conditional logging to prevent
25@@ -166,2 +169,3 @@ void ValidationSignals::SyncWithValidationInterfaceQueue()
26 LOG_EVENT(fmt, local_name, __VA_ARGS__); \
27+ if(g_rnd.randrange(2)<1)UninterruptibleSleep(55ms);\
28 event(); \
With this diff and without the changes here, the touched tests fail. With this diff and with the changes here, the touched tests pass.