aboutsummaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-09-21 16:30:57 +0000
committerfanquake <fanquake@gmail.com>2023-09-21 16:31:05 +0000
commitf29091410d2de8279c727bda5ed21595d4e8bbdc (patch)
treed735963d3eeb6267ad8cd87f8ab36444493eafda /src/kernel
parent2303fd2f4332f1414526219c54804c8277e1bb5b (diff)
parent78c2707b2aefa9e0aee5ddceaeab31997085a241 (diff)
Merge bitcoin/bitcoin#28379: Refactor: Remove m_is_test_chain
78c2707b2aefa9e0aee5ddceaeab31997085a241 Refactor: Replace 'isMockableChain' with inline 'ChainType' check for 'submitpackage' (Tim Neubauer) 27b4084e16a1cb210ce27119416ee34625781052 Refactor: Remove m_is_test_chain (Tim Neubauer) Pull request description: Remove the m_is_test_chain bool Compiled and run tests locally #28376 ACKs for top commit: MarcoFalke: re-ACK 78c2707b2aefa9e0aee5ddceaeab31997085a241 ajtowns: ACK 78c2707b2aefa9e0aee5ddceaeab31997085a241 Tree-SHA512: 2eedd855c379dd12b7ff28b0e03414680cc892313f16502f36e09906513df9c222e8cc2cea3ff4d9a4f47c9efdfa00d017f38398021b0c96d4543711206d6ff8
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/chainparams.cpp4
-rw-r--r--src/kernel/chainparams.h3
2 files changed, 1 insertions, 6 deletions
diff --git a/src/kernel/chainparams.cpp b/src/kernel/chainparams.cpp
index 6cee379faf..7e69c097a6 100644
--- a/src/kernel/chainparams.cpp
+++ b/src/kernel/chainparams.cpp
@@ -152,7 +152,6 @@ public:
vFixedSeeds = std::vector<uint8_t>(std::begin(chainparams_seed_main), std::end(chainparams_seed_main));
fDefaultConsistencyChecks = false;
- m_is_test_chain = false;
m_is_mockable_chain = false;
checkpointData = {
@@ -259,7 +258,6 @@ public:
vFixedSeeds = std::vector<uint8_t>(std::begin(chainparams_seed_test), std::end(chainparams_seed_test));
fDefaultConsistencyChecks = false;
- m_is_test_chain = true;
m_is_mockable_chain = false;
checkpointData = {
@@ -381,7 +379,6 @@ public:
bech32_hrp = "tb";
fDefaultConsistencyChecks = false;
- m_is_test_chain = true;
m_is_mockable_chain = false;
}
};
@@ -472,7 +469,6 @@ public:
vSeeds.emplace_back("dummySeed.invalid.");
fDefaultConsistencyChecks = true;
- m_is_test_chain = true;
m_is_mockable_chain = true;
checkpointData = {
diff --git a/src/kernel/chainparams.h b/src/kernel/chainparams.h
index 63837bb23e..ec1697493c 100644
--- a/src/kernel/chainparams.h
+++ b/src/kernel/chainparams.h
@@ -93,7 +93,7 @@ public:
/** Default value for -checkmempool and -checkblockindex argument */
bool DefaultConsistencyChecks() const { return fDefaultConsistencyChecks; }
/** If this chain is exclusively used for testing */
- bool IsTestChain() const { return m_is_test_chain; }
+ bool IsTestChain() const { return m_chain_type != ChainType::MAIN; }
/** If this chain allows time to be mocked */
bool IsMockableChain() const { return m_is_mockable_chain; }
uint64_t PruneAfterHeight() const { return nPruneAfterHeight; }
@@ -167,7 +167,6 @@ protected:
CBlock genesis;
std::vector<uint8_t> vFixedSeeds;
bool fDefaultConsistencyChecks;
- bool m_is_test_chain;
bool m_is_mockable_chain;
CCheckpointData checkpointData;
MapAssumeutxo m_assumeutxo_data;