aboutsummaryrefslogtreecommitdiff
path: root/src/deploymentinfo.cpp
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2021-03-11 12:47:24 +1000
committerAnthony Towns <aj@erisian.com.au>2021-06-30 08:19:12 +1000
commit92f48f360da5f425428b761219301f509826bec4 (patch)
tree06edcd128c8025ada2211aaaa4aa5212e9867f48 /src/deploymentinfo.cpp
parentea68b3a5729f5d240e968388c4f88acffeb27228 (diff)
deploymentinfo: Add DeploymentName()
Diffstat (limited to 'src/deploymentinfo.cpp')
-rw-r--r--src/deploymentinfo.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/deploymentinfo.cpp b/src/deploymentinfo.cpp
index 70d9961133..030a7806de 100644
--- a/src/deploymentinfo.cpp
+++ b/src/deploymentinfo.cpp
@@ -16,3 +16,21 @@ const struct VBDeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_B
/*.gbt_force =*/ true,
},
};
+
+std::string DeploymentName(Consensus::BuriedDeployment dep)
+{
+ assert(ValidDeployment(dep));
+ switch (dep) {
+ case Consensus::DEPLOYMENT_HEIGHTINCB:
+ return "bip34";
+ case Consensus::DEPLOYMENT_CLTV:
+ return "bip65";
+ case Consensus::DEPLOYMENT_DERSIG:
+ return "bip66";
+ case Consensus::DEPLOYMENT_CSV:
+ return "csv";
+ case Consensus::DEPLOYMENT_SEGWIT:
+ return "segwit";
+ } // no default case, so the compiler can warn about missing cases
+ return "";
+}