aboutsummaryrefslogtreecommitdiff
path: root/src/test/versionbits_tests.cpp
diff options
context:
space:
mode:
authorJorge Timón <jtimon@jtimon.cc>2015-11-28 15:04:35 +0100
committerJorge Timón <jtimon@jtimon.cc>2017-05-03 18:15:54 +0200
commit2351a064a604f5aa961a38a3920289546dada16f (patch)
tree6878027b39f34a4de14fa14b89304e11be322357 /src/test/versionbits_tests.cpp
parentf87f3626e35e7edae37e14f5156809325ad18cb2 (diff)
Chainparams: Get rid of CChainParams& Params(std::string)
Diffstat (limited to 'src/test/versionbits_tests.cpp')
-rw-r--r--src/test/versionbits_tests.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/versionbits_tests.cpp b/src/test/versionbits_tests.cpp
index e2b5573abd..79405ec4d1 100644
--- a/src/test/versionbits_tests.cpp
+++ b/src/test/versionbits_tests.cpp
@@ -209,7 +209,8 @@ BOOST_AUTO_TEST_CASE(versionbits_test)
}
// Sanity checks of version bit deployments
- const Consensus::Params &mainnetParams = Params(CBaseChainParams::MAIN).GetConsensus();
+ const auto chainParams = CreateChainParams(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, (Consensus::DeploymentPos)i);
// Make sure that no deployment tries to set an invalid bit.
@@ -235,7 +236,8 @@ BOOST_AUTO_TEST_CASE(versionbits_computeblockversion)
{
// Check that ComputeBlockVersion will set the appropriate bit correctly
// on mainnet.
- const Consensus::Params &mainnetParams = Params(CBaseChainParams::MAIN).GetConsensus();
+ const auto chainParams = CreateChainParams(CBaseChainParams::MAIN);
+ const Consensus::Params &mainnetParams = chainParams->GetConsensus();
// Use the TESTDUMMY deployment for testing purposes.
int64_t bit = mainnetParams.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit;