diff --git a/src/test/util/index.cpp b/src/test/util/index.cpp index 2bda7b1773..89bc35b731 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 02030fd562..95309f6273 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