LCOV - code coverage report
Current view: top level - src - deploymentinfo.h (source / functions) Hit Total Coverage
Test: fuzz_coverage.info Lines: 3 4 75.0 %
Date: 2023-10-05 15:40:34 Functions: 1 1 100.0 %
Branches: 2 4 50.0 %

           Branch data     Line data    Source code
       1                 :            : // Copyright (c) 2016-2021 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                 :            : #ifndef BITCOIN_DEPLOYMENTINFO_H
       6                 :            : #define BITCOIN_DEPLOYMENTINFO_H
       7                 :            : 
       8                 :            : #include <consensus/params.h>
       9                 :            : 
      10                 :            : #include <optional>
      11                 :            : #include <string>
      12                 :            : 
      13                 :            : struct VBDeploymentInfo {
      14                 :            :     /** Deployment name */
      15                 :            :     const char *name;
      16                 :            :     /** Whether GBT clients can safely ignore this rule in simplified usage */
      17                 :            :     bool gbt_force;
      18                 :            : };
      19                 :            : 
      20                 :            : extern const VBDeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_BITS_DEPLOYMENTS];
      21                 :            : 
      22                 :            : std::string DeploymentName(Consensus::BuriedDeployment dep);
      23                 :            : 
      24                 :          4 : inline std::string DeploymentName(Consensus::DeploymentPos pos)
      25                 :            : {
      26         [ +  - ]:          4 :     assert(Consensus::ValidDeployment(pos));
      27         [ -  + ]:          4 :     return VersionBitsDeploymentInfo[pos].name;
      28                 :          0 : }
      29                 :            : 
      30                 :            : std::optional<Consensus::BuriedDeployment> GetBuriedDeployment(const std::string_view deployment_name);
      31                 :            : 
      32                 :            : #endif // BITCOIN_DEPLOYMENTINFO_H

Generated by: LCOV version 1.14