LCOV - code coverage report
Current view: top level - src/test/util - index.cpp (source / functions) Hit Total Coverage
Test: fuzz_coverage.info Lines: 0 6 0.0 %
Date: 2023-11-06 23:13:05 Functions: 0 1 0.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : // Copyright (c) 2020-2022 The Bitcoin Core developers
       2                 :            : // Distributed under the MIT software license, see the accompanying
       3                 :            : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
       4                 :            : 
       5                 :            : #include <test/util/index.h>
       6                 :            : 
       7                 :            : #include <index/base.h>
       8                 :            : #include <shutdown.h>
       9                 :            : #include <util/check.h>
      10                 :            : #include <util/time.h>
      11                 :            : 
      12                 :          0 : void IndexWaitSynced(const BaseIndex& index)
      13                 :            : {
      14                 :          0 :     while (!index.BlockUntilSyncedToCurrentChain()) {
      15                 :            :         // Assert shutdown was not requested to abort the test, instead of looping forever, in case
      16                 :            :         // there was an unexpected error in the index that caused it to stop syncing and request a shutdown.
      17                 :          0 :         Assert(!ShutdownRequested());
      18                 :            : 
      19                 :          0 :         UninterruptibleSleep(100ms);
      20                 :            :     }
      21                 :          0 :     assert(index.GetSummary().synced);
      22                 :          0 : }

Generated by: LCOV version 1.14