LCOV - code coverage report
Current view: top level - src/test/util - validation.cpp (source / functions) Coverage Total Hit
Test: fuzz_coverage.info Lines: 57.9 % 19 11
Test Date: 2025-07-28 04:06:55 Functions: 50.0 % 4 2
Branches: 75.0 % 4 3

             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/validation.h>
       6                 :             : 
       7                 :             : #include <util/check.h>
       8                 :             : #include <util/time.h>
       9                 :             : #include <validation.h>
      10                 :             : #include <validationinterface.h>
      11                 :             : 
      12                 :       10548 : void TestChainstateManager::DisableNextWrite()
      13                 :             : {
      14                 :       10548 :     struct TestChainstate : public Chainstate {
      15                 :       10548 :         void ResetNextWrite() { m_next_write = NodeClock::time_point::max() - 1s; }
      16                 :             :     };
      17         [ +  + ]:       21096 :     for (auto* cs : GetAll()) {
      18                 :       10548 :         static_cast<TestChainstate*>(cs)->ResetNextWrite();
      19                 :       10548 :     }
      20                 :       10548 : }
      21                 :       12047 : void TestChainstateManager::ResetIbd()
      22                 :             : {
      23                 :       12047 :     m_cached_finished_ibd = false;
      24         [ -  + ]:       12047 :     assert(IsInitialBlockDownload());
      25                 :       12047 : }
      26                 :             : 
      27                 :           0 : void TestChainstateManager::JumpOutOfIbd()
      28                 :             : {
      29                 :           0 :     Assert(IsInitialBlockDownload());
      30                 :           0 :     m_cached_finished_ibd = true;
      31                 :           0 :     Assert(!IsInitialBlockDownload());
      32                 :           0 : }
      33                 :             : 
      34                 :           0 : void ValidationInterfaceTest::BlockConnected(
      35                 :             :         ChainstateRole role,
      36                 :             :         CValidationInterface& obj,
      37                 :             :         const std::shared_ptr<const CBlock>& block,
      38                 :             :         const CBlockIndex* pindex)
      39                 :             : {
      40                 :           0 :     obj.BlockConnected(role, block, pindex);
      41                 :           0 : }
        

Generated by: LCOV version 2.0-1