Inside Bitcoin
Opening the selected file…
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1// Copyright (c) 2016-present The Bitcoin Core developers2// Distributed under the MIT software license, see the accompanying3// file COPYING or http://www.opensource.org/licenses/mit-license.php.5#include <deploymentinfo.h>7#include <consensus/params.h>9#include <string_view>11const std::array<VBDeploymentInfo,Consensus::MAX_VERSION_BITS_DEPLOYMENTS> VersionBitsDeploymentInfo{12VBDeploymentInfo{13.name = "testdummy",14.gbt_optional_rule = true,15},16};18std::string DeploymentName(Consensus::BuriedDeployment dep)19{20assert(ValidDeployment(dep));21switch (dep) {22case Consensus::DEPLOYMENT_HEIGHTINCB:23return "bip34";24case Consensus::DEPLOYMENT_CLTV:25return "bip65";26case Consensus::DEPLOYMENT_DERSIG:27return "bip66";28case Consensus::DEPLOYMENT_CSV:29return "csv";30case Consensus::DEPLOYMENT_SEGWIT:31return "segwit";32} // no default case, so the compiler can warn about missing cases33return "";34}36std::optional<Consensus::BuriedDeployment> GetBuriedDeployment(const std::string_view name)37{38if (name == "segwit") {39return Consensus::BuriedDeployment::DEPLOYMENT_SEGWIT;40} else if (name == "bip34") {41return Consensus::BuriedDeployment::DEPLOYMENT_HEIGHTINCB;42} else if (name == "dersig") {43return Consensus::BuriedDeployment::DEPLOYMENT_DERSIG;44} else if (name == "cltv") {45return Consensus::BuriedDeployment::DEPLOYMENT_CLTV;46} else if (name == "csv") {47return Consensus::BuriedDeployment::DEPLOYMENT_CSV;48}49return std::nullopt;50}
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.