LCOV - code coverage report
Current view: top level - src - deploymentinfo.h (source / functions) Coverage Total Hit
Test: fuzz_coverage.info Lines: 100.0 % 3 3
Test Date: 2024-11-04 04:15:01 Functions: 100.0 % 1 1
Branches: 50.0 % 2 1

             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                 :           6 : inline std::string DeploymentName(Consensus::DeploymentPos pos)
      25                 :             : {
      26         [ -  + ]:           6 :     assert(Consensus::ValidDeployment(pos));
      27                 :           6 :     return VersionBitsDeploymentInfo[pos].name;
      28                 :             : }
      29                 :             : 
      30                 :             : std::optional<Consensus::BuriedDeployment> GetBuriedDeployment(const std::string_view deployment_name);
      31                 :             : 
      32                 :             : #endif // BITCOIN_DEPLOYMENTINFO_H
        

Generated by: LCOV version 2.0-1