@@ -1457,7 +1457,7 @@ PackageMempoolAcceptResult ProcessNewPackage(CChainState& active_chainstate, CTx
1457
1457
assert (std::all_of (package.cbegin (), package.cend (), [](const auto & tx){return tx != nullptr ;}));
1458
1458
1459
1459
std::vector<COutPoint> coins_to_uncache;
1460
- const CChainParams& chainparams = Params () ;
1460
+ const CChainParams& chainparams = active_chainstate. m_params ;
1461
1461
const auto result = [&]() EXCLUSIVE_LOCKS_REQUIRED (cs_main) {
1462
1462
AssertLockHeld (cs_main);
1463
1463
if (test_accept) {
@@ -1515,7 +1515,7 @@ CChainState::CChainState(
1515
1515
std::optional<uint256> from_snapshot_blockhash)
1516
1516
: m_mempool(mempool),
1517
1517
m_blockman(blockman),
1518
- m_params(::Params ()),
1518
+ m_params(chainman.GetParams ()),
1519
1519
m_chainman(chainman),
1520
1520
m_from_snapshot_blockhash(from_snapshot_blockhash) {}
1521
1521
@@ -4993,7 +4993,7 @@ bool ChainstateManager::PopulateAndValidateSnapshot(
4993
4993
}
4994
4994
4995
4995
int base_height = snapshot_start_block->nHeight ;
4996
- auto maybe_au_data = ExpectedAssumeutxo (base_height, :: Params ());
4996
+ auto maybe_au_data = ExpectedAssumeutxo (base_height, GetParams ());
4997
4997
4998
4998
if (!maybe_au_data) {
4999
4999
LogPrintf (" [snapshot] assumeutxo height in snapshot metadata not recognized " /* Continued */
@@ -5147,7 +5147,7 @@ bool ChainstateManager::PopulateAndValidateSnapshot(
5147
5147
5148
5148
// Fake BLOCK_OPT_WITNESS so that CChainState::NeedsRedownload()
5149
5149
// won't ask to rewind the entire assumed-valid chain on startup.
5150
- if (DeploymentActiveAt (*index, :: Params (). GetConsensus (), Consensus::DEPLOYMENT_SEGWIT)) {
5150
+ if (DeploymentActiveAt (*index, GetConsensus (), Consensus::DEPLOYMENT_SEGWIT)) {
5151
5151
index->nStatus |= BLOCK_OPT_WITNESS;
5152
5152
}
5153
5153
0 commit comments