From fabed7eb796637c02e3677ebbe183d90b258ba69 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 6 Jul 2023 14:28:15 +0200 Subject: [PATCH] test: Restore unlimited timeout in IndexWaitSynced The timeout was unlimited before, so just restore that value for now: https://github.com/bitcoin/bitcoin/pull/27988#issuecomment-1619218007 --- src/test/util/index.cpp | 5 +---- src/test/util/index.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/test/util/index.cpp b/src/test/util/index.cpp index 2bda7b17736..89bc35b7316 100644 --- a/src/test/util/index.cpp +++ b/src/test/util/index.cpp @@ -5,14 +5,11 @@ #include #include -#include #include -void IndexWaitSynced(BaseIndex& index) +void IndexWaitSynced(const BaseIndex& index) { - const auto timeout{SteadyClock::now() + 120s}; while (!index.BlockUntilSyncedToCurrentChain()) { - Assert(timeout > SteadyClock::now()); UninterruptibleSleep(100ms); } } diff --git a/src/test/util/index.h b/src/test/util/index.h index 02030fd562d..95309f62736 100644 --- a/src/test/util/index.h +++ b/src/test/util/index.h @@ -8,6 +8,6 @@ class BaseIndex; /** Block until the index is synced to the current chain */ -void IndexWaitSynced(BaseIndex& index); +void IndexWaitSynced(const BaseIndex& index); #endif // BITCOIN_TEST_UTIL_INDEX_H