mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-14 04:00:41 +02:00
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:
parent
bc4f6b13fe
commit
fabed7eb79
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user