Bitcoin Core 31.99.0
P2P Digital Currency
deploymentinfo.cpp
Go to the documentation of this file.
1// Copyright (c) 2016-present 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_optional_rule = true,
15 },
16};
17
19{
21 switch (dep) {
23 return "bip34";
25 return "bip65";
27 return "bip66";
29 return "csv";
31 return "segwit";
32 } // no default case, so the compiler can warn about missing cases
33 return "";
34}
35
36std::optional<Consensus::BuriedDeployment> GetBuriedDeployment(const std::string_view name)
37{
38 if (name == "segwit") {
40 } else if (name == "bip34") {
42 } else if (name == "dersig") {
44 } else if (name == "cltv") {
46 } else if (name == "csv") {
48 }
49 return std::nullopt;
50}
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:35
BuriedDeployment
A buried deployment is one where the height of the activation has been hardcoded into the client impl...
Definition: params.h:25
@ DEPLOYMENT_DERSIG
Definition: params.h:29
@ DEPLOYMENT_CSV
Definition: params.h:30
@ DEPLOYMENT_SEGWIT
Definition: params.h:33
@ DEPLOYMENT_HEIGHTINCB
Definition: params.h:27
@ DEPLOYMENT_CLTV
Definition: params.h:28
const char * name
Definition: rest.cpp:49
const char * name
Deployment name.
assert(!tx.IsCoinBase())