From ea68b3a5729f5d240e968388c4f88acffeb27228 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Thu, 11 Mar 2021 12:17:22 +1000 Subject: [move-only] Rename versionbitsinfo to deploymentinfo --- src/Makefile.am | 4 ++-- src/chainparams.cpp | 2 +- src/consensus/params.h | 2 +- src/deploymentinfo.cpp | 18 ++++++++++++++++++ src/deploymentinfo.h | 17 +++++++++++++++++ src/rpc/mining.cpp | 2 +- src/versionbitsinfo.cpp | 18 ------------------ src/versionbitsinfo.h | 17 ----------------- 8 files changed, 40 insertions(+), 40 deletions(-) create mode 100644 src/deploymentinfo.cpp create mode 100644 src/deploymentinfo.h delete mode 100644 src/versionbitsinfo.cpp delete mode 100644 src/versionbitsinfo.h diff --git a/src/Makefile.am b/src/Makefile.am index a8e1b7bc1e..37ba5ad75b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -145,6 +145,7 @@ BITCOIN_CORE_H = \ core_memusage.h \ cuckoocache.h \ dbwrapper.h \ + deploymentinfo.h \ deploymentstatus.h \ external_signer.h \ flatfile.h \ @@ -273,7 +274,6 @@ BITCOIN_CORE_H = \ validation.h \ validationinterface.h \ versionbits.h \ - versionbitsinfo.h \ wallet/bdb.h \ wallet/coincontrol.h \ wallet/coinselection.h \ @@ -542,6 +542,7 @@ libbitcoin_common_a_SOURCES = \ compressor.cpp \ core_read.cpp \ core_write.cpp \ + deploymentinfo.cpp \ external_signer.cpp \ init/common.cpp \ key.cpp \ @@ -563,7 +564,6 @@ libbitcoin_common_a_SOURCES = \ script/sign.cpp \ script/signingprovider.cpp \ script/standard.cpp \ - versionbitsinfo.cpp \ warnings.cpp \ $(BITCOIN_CORE_H) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index fdaadeed4a..58a27e053b 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -7,9 +7,9 @@ #include #include +#include #include // for signet block challenge hash #include -#include #include diff --git a/src/consensus/params.h b/src/consensus/params.h index 7d5fe1a734..174f4677fa 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -26,7 +26,7 @@ enum DeploymentPos : uint16_t { DEPLOYMENT_TESTDUMMY, DEPLOYMENT_TAPROOT, // Deployment of Schnorr/Taproot (BIPs 340-342) - // NOTE: Also add new deployments to VersionBitsDeploymentInfo in versionbits.cpp + // NOTE: Also add new deployments to VersionBitsDeploymentInfo in deploymentinfo.cpp MAX_VERSION_BITS_DEPLOYMENTS }; constexpr bool ValidDeployment(DeploymentPos dep) { return DEPLOYMENT_TESTDUMMY <= dep && dep <= DEPLOYMENT_TAPROOT; } diff --git a/src/deploymentinfo.cpp b/src/deploymentinfo.cpp new file mode 100644 index 0000000000..70d9961133 --- /dev/null +++ b/src/deploymentinfo.cpp @@ -0,0 +1,18 @@ +// Copyright (c) 2016-2020 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include + +#include + +const struct VBDeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_BITS_DEPLOYMENTS] = { + { + /*.name =*/ "testdummy", + /*.gbt_force =*/ true, + }, + { + /*.name =*/ "taproot", + /*.gbt_force =*/ true, + }, +}; diff --git a/src/deploymentinfo.h b/src/deploymentinfo.h new file mode 100644 index 0000000000..4c68856eac --- /dev/null +++ b/src/deploymentinfo.h @@ -0,0 +1,17 @@ +// Copyright (c) 2016-2018 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 + +struct VBDeploymentInfo { + /** Deployment name */ + const char *name; + /** Whether GBT clients can safely ignore this rule in simplified usage */ + bool gbt_force; +}; + +extern const struct VBDeploymentInfo VersionBitsDeploymentInfo[]; + +#endif // BITCOIN_DEPLOYMENTINFO_H diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index d6ca0959f2..04aa459e11 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -35,7 +36,6 @@ #include #include #include -#include #include #include diff --git a/src/versionbitsinfo.cpp b/src/versionbitsinfo.cpp deleted file mode 100644 index fa41bad46d..0000000000 --- a/src/versionbitsinfo.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2016-2020 The Bitcoin Core developers -// Distributed under the MIT software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. - -#include - -#include - -const struct VBDeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_BITS_DEPLOYMENTS] = { - { - /*.name =*/ "testdummy", - /*.gbt_force =*/ true, - }, - { - /*.name =*/ "taproot", - /*.gbt_force =*/ true, - }, -}; diff --git a/src/versionbitsinfo.h b/src/versionbitsinfo.h deleted file mode 100644 index a7822bc747..0000000000 --- a/src/versionbitsinfo.h +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2016-2018 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_VERSIONBITSINFO_H -#define BITCOIN_VERSIONBITSINFO_H - -struct VBDeploymentInfo { - /** Deployment name */ - const char *name; - /** Whether GBT clients can safely ignore this rule in simplified usage */ - bool gbt_force; -}; - -extern const struct VBDeploymentInfo VersionBitsDeploymentInfo[]; - -#endif // BITCOIN_VERSIONBITSINFO_H -- cgit v1.2.3