Bitcoin Core 29.99.0
P2P Digital Currency
deploymentinfo.cpp
Go to the documentation of this file.
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#include <deploymentinfo.h>
6
7#include <consensus/params.h>
8
9#include <string_view>
10
11const std::array<VBDeploymentInfo,Consensus::MAX_VERSION_BITS_DEPLOYMENTS> VersionBitsDeploymentInfo{
13 .name = "testdummy",
14 .gbt_force = true,
15 },
17 .name = "taproot",
18 .gbt_force = true,
19 },
20};
21
23{
25 switch (dep) {
27 return "bip34";
29 return "bip65";
31 return "bip66";
33 return "csv";
35 return "segwit";
36 } // no default case, so the compiler can warn about missing cases
37 return "";
38}
39
40std::optional<Consensus::BuriedDeployment> GetBuriedDeployment(const std::string_view name)
41{
42 if (name == "segwit") {
44 } else if (name == "bip34") {
46 } else if (name == "dersig") {
48 } else if (name == "cltv") {
50 } else if (name == "csv") {
52 }
53 return std::nullopt;
54}
std::optional< Consensus::BuriedDeployment > GetBuriedDeployment(const std::string_view name)
std::string DeploymentName(Consensus::BuriedDeployment dep)
const std::array< VBDeploymentInfo, Consensus::MAX_VERSION_BITS_DEPLOYMENTS > VersionBitsDeploymentInfo
constexpr bool ValidDeployment(BuriedDeployment dep)
Definition: params.h:31
BuriedDeployment
A buried deployment is one where the height of the activation has been hardcoded into the client impl...
Definition: params.h:23
@ DEPLOYMENT_DERSIG
Definition: params.h:27
@ DEPLOYMENT_CSV
Definition: params.h:28
@ DEPLOYMENT_SEGWIT
Definition: params.h:29
@ DEPLOYMENT_HEIGHTINCB
Definition: params.h:25
@ DEPLOYMENT_CLTV
Definition: params.h:26
const char * name
Definition: rest.cpp:49
const char * name
Deployment name.
assert(!tx.IsCoinBase())