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
This commit is contained in:
MarcoFalke 2023-07-06 14:28:15 +02:00
parent bc4f6b13fe
commit fabed7eb79
No known key found for this signature in database
2 changed files with 2 additions and 5 deletions

View file

@ -5,14 +5,11 @@
#include <test/util/index.h>
#include <index/base.h>
#include <util/check.h>
#include <util/time.h>
void IndexWaitSynced(BaseIndex& index)
void IndexWaitSynced(const BaseIndex& index)
{
const auto timeout{SteadyClock::now() + 120s};
while (!index.BlockUntilSyncedToCurrentChain()) {
Assert(timeout > SteadyClock::now());
UninterruptibleSleep(100ms);
}
}

View file

@ -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