diff options
author | fanquake <fanquake@gmail.com> | 2023-07-07 09:40:22 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-07-07 09:57:37 +0100 |
commit | 299f17a69e1b64ebbe0f10c4d833ee14a5fb821a (patch) | |
tree | d4dc9265ae1c1911df2385d5ca344d80ad6583e7 /src/test | |
parent | 334f45fe62c7e9fe68030738f228023e2f0cf392 (diff) | |
parent | fabed7eb796637c02e3677ebbe183d90b258ba69 (diff) |
Merge bitcoin/bitcoin#28036: test: Restore unlimited timeout in IndexWaitSynced
fabed7eb796637c02e3677ebbe183d90b258ba69 test: Restore unlimited timeout in IndexWaitSynced (MarcoFalke)
Pull request description:
The timeout was unlimited before, so just restore that value for now: https://github.com/bitcoin/bitcoin/pull/27988#issuecomment-1619218007 .
(Strictly speaking, this is a behavior change for the blockfilterindex and txindex tests, because it only restores the coinstatsindex behavior.)
ACKs for top commit:
ajtowns:
utACK fabed7eb796637c02e3677ebbe183d90b258ba69
mzumsande:
ACK fabed7eb796637c02e3677ebbe183d90b258ba69
furszy:
ACK fabed7eb
Tree-SHA512: 66a878be58bbe53ad8e0c23f05569dd42df688be747551fbd202ada22d20a8285714e58fa2a71664deadb070ddf86cfad88c01042ff95ed26f6b40e4a10cec0a
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/util/index.cpp | 5 | ||||
-rw-r--r-- | 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 2bda7b1773..89bc35b731 100644 --- a/src/test/util/index.cpp +++ b/src/test/util/index.cpp @@ -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); } } 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 |