mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Remove gArgs global from CreateChainParams to aid testing
This commit is contained in:
@@ -223,7 +223,7 @@ BOOST_AUTO_TEST_CASE(versionbits_test)
|
||||
}
|
||||
|
||||
// Sanity checks of version bit deployments
|
||||
const auto chainParams = CreateChainParams(CBaseChainParams::MAIN);
|
||||
const auto chainParams = CreateChainParams(*m_node.args, CBaseChainParams::MAIN);
|
||||
const Consensus::Params &mainnetParams = chainParams->GetConsensus();
|
||||
for (int i=0; i<(int) Consensus::MAX_VERSION_BITS_DEPLOYMENTS; i++) {
|
||||
uint32_t bitmask = VersionBitsMask(mainnetParams, static_cast<Consensus::DeploymentPos>(i));
|
||||
@@ -250,7 +250,7 @@ BOOST_AUTO_TEST_CASE(versionbits_computeblockversion)
|
||||
{
|
||||
// Check that ComputeBlockVersion will set the appropriate bit correctly
|
||||
// on mainnet.
|
||||
const auto chainParams = CreateChainParams(CBaseChainParams::MAIN);
|
||||
const auto chainParams = CreateChainParams(*m_node.args, CBaseChainParams::MAIN);
|
||||
const Consensus::Params &mainnetParams = chainParams->GetConsensus();
|
||||
|
||||
// Use the TESTDUMMY deployment for testing purposes.
|
||||
|
||||
Reference in New Issue
Block a user