File tree Expand file tree Collapse file tree 3 files changed +2
-7
lines changed Expand file tree Collapse file tree 3 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,6 @@ class CMainParams : public CChainParams {
152
152
vFixedSeeds = std::vector<uint8_t >(std::begin (chainparams_seed_main), std::end (chainparams_seed_main));
153
153
154
154
fDefaultConsistencyChecks = false ;
155
- m_is_test_chain = false ;
156
155
m_is_mockable_chain = false ;
157
156
158
157
checkpointData = {
@@ -259,7 +258,6 @@ class CTestNetParams : public CChainParams {
259
258
vFixedSeeds = std::vector<uint8_t >(std::begin (chainparams_seed_test), std::end (chainparams_seed_test));
260
259
261
260
fDefaultConsistencyChecks = false ;
262
- m_is_test_chain = true ;
263
261
m_is_mockable_chain = false ;
264
262
265
263
checkpointData = {
@@ -381,7 +379,6 @@ class SigNetParams : public CChainParams {
381
379
bech32_hrp = " tb" ;
382
380
383
381
fDefaultConsistencyChecks = false ;
384
- m_is_test_chain = true ;
385
382
m_is_mockable_chain = false ;
386
383
}
387
384
};
@@ -472,7 +469,6 @@ class CRegTestParams : public CChainParams
472
469
vSeeds.emplace_back (" dummySeed.invalid." );
473
470
474
471
fDefaultConsistencyChecks = true ;
475
- m_is_test_chain = true ;
476
472
m_is_mockable_chain = true ;
477
473
478
474
checkpointData = {
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ class CChainParams
93
93
/* * Default value for -checkmempool and -checkblockindex argument */
94
94
bool DefaultConsistencyChecks () const { return fDefaultConsistencyChecks ; }
95
95
/* * If this chain is exclusively used for testing */
96
- bool IsTestChain () const { return m_is_test_chain ; }
96
+ bool IsTestChain () const { return m_chain_type != ChainType::MAIN ; }
97
97
/* * If this chain allows time to be mocked */
98
98
bool IsMockableChain () const { return m_is_mockable_chain; }
99
99
uint64_t PruneAfterHeight () const { return nPruneAfterHeight; }
@@ -167,7 +167,6 @@ class CChainParams
167
167
CBlock genesis;
168
168
std::vector<uint8_t > vFixedSeeds;
169
169
bool fDefaultConsistencyChecks ;
170
- bool m_is_test_chain;
171
170
bool m_is_mockable_chain;
172
171
CCheckpointData checkpointData;
173
172
MapAssumeutxo m_assumeutxo_data;
Original file line number Diff line number Diff line change @@ -862,7 +862,7 @@ static RPCHelpMan submitpackage()
862
862
},
863
863
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
864
864
{
865
- if (! Params ().IsMockableChain () ) {
865
+ if (Params ().GetChainType () != ChainType::REGTEST ) {
866
866
throw std::runtime_error (" submitpackage is for regression testing (-regtest mode) only" );
867
867
}
868
868
const UniValue raw_transactions = request.params [0 ].get_array ();
You can’t perform that action at this time.
0 commit comments