0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-04 10:07:27 -05:00
bitcoin-bitcoin-core/src/deploymentinfo.h

33 lines
973 B
C
Raw Normal View History

// Copyright (c) 2016-2021 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_DEPLOYMENTINFO_H
#define BITCOIN_DEPLOYMENTINFO_H
2021-03-11 12:47:24 +10:00
#include <consensus/params.h>
#include <optional>
2021-03-11 12:47:24 +10:00
#include <string>
struct VBDeploymentInfo {
/** Deployment name */
const char *name;
/** Whether GBT clients can safely ignore this rule in simplified usage */
bool gbt_force;
};
2021-03-11 12:47:24 +10:00
extern const VBDeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_BITS_DEPLOYMENTS];
std::string DeploymentName(Consensus::BuriedDeployment dep);
inline std::string DeploymentName(Consensus::DeploymentPos pos)
{
assert(Consensus::ValidDeployment(pos));
return VersionBitsDeploymentInfo[pos].name;
}
std::optional<Consensus::BuriedDeployment> GetBuriedDeployment(const std::string_view deployment_name);
#endif // BITCOIN_DEPLOYMENTINFO_H