mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 99b3af78bd into merged_master (Bitcoin PR bitcoin/bitcoin#28044)
This commit is contained in:
commit
48227e0d28
1 changed files with 7 additions and 0 deletions
|
|
@ -5,11 +5,18 @@
|
|||
#include <test/util/index.h>
|
||||
|
||||
#include <index/base.h>
|
||||
#include <shutdown.h>
|
||||
#include <util/check.h>
|
||||
#include <util/time.h>
|
||||
|
||||
void IndexWaitSynced(const BaseIndex& index)
|
||||
{
|
||||
while (!index.BlockUntilSyncedToCurrentChain()) {
|
||||
// Assert shutdown was not requested to abort the test, instead of looping forever, in case
|
||||
// there was an unexpected error in the index that caused it to stop syncing and request a shutdown.
|
||||
Assert(!ShutdownRequested());
|
||||
|
||||
UninterruptibleSleep(100ms);
|
||||
}
|
||||
assert(index.GetSummary().synced);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue