diff options
author | Tim Neubauer <timnbr99@gmail.com> | 2023-08-31 18:59:43 +0200 |
---|---|---|
committer | Tim Neubauer <timnbr99@gmail.com> | 2023-08-31 18:59:43 +0200 |
commit | 27b4084e16a1cb210ce27119416ee34625781052 (patch) | |
tree | ce4d36bcf05c409cc8e445d997f8b24adc01d9c1 /src | |
parent | a4e0bcb6c9a8db5a74c74c5cddbb065ba9182482 (diff) |
Refactor: Remove m_is_test_chain
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel/chainparams.cpp | 4 | ||||
-rw-r--r-- | src/kernel/chainparams.h | 3 |
2 files changed, 1 insertions, 6 deletions
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<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 = { @@ -258,7 +257,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 = { @@ -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<uint8_t> vFixedSeeds; bool fDefaultConsistencyChecks; - bool m_is_test_chain; bool m_is_mockable_chain; CCheckpointData checkpointData; MapAssumeutxo m_assumeutxo_data; |