diff --git a/src/kernel/chainparams.cpp b/src/kernel/chainparams.cpp index 733a3339b3..9968e0fa09 100644 --- a/src/kernel/chainparams.cpp +++ b/src/kernel/chainparams.cpp @@ -151,7 +151,6 @@ public: vFixedSeeds = std::vector(std::begin(chainparams_seed_main), std::end(chainparams_seed_main)); fDefaultConsistencyChecks = false; - m_is_test_chain = false; m_is_mockable_chain = false; checkpointData = { @@ -258,7 +257,6 @@ public: vFixedSeeds = std::vector(std::begin(chainparams_seed_test), std::end(chainparams_seed_test)); fDefaultConsistencyChecks = false; - m_is_test_chain = true; m_is_mockable_chain = false; checkpointData = { @@ -380,7 +378,6 @@ public: bech32_hrp = "tb"; fDefaultConsistencyChecks = false; - m_is_test_chain = true; m_is_mockable_chain = false; } }; @@ -471,7 +468,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 2d38af609c..285d76b623 100644 --- a/src/kernel/chainparams.h +++ b/src/kernel/chainparams.h @@ -103,7 +103,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; } @@ -177,7 +177,6 @@ protected: CBlock genesis; std::vector vFixedSeeds; bool fDefaultConsistencyChecks; - bool m_is_test_chain; bool m_is_mockable_chain; CCheckpointData checkpointData; MapAssumeutxo m_assumeutxo_data;