diff options
author | Jorge Timón <jtimon@jtimon.cc> | 2015-11-28 15:04:35 +0100 |
---|---|---|
committer | Jorge Timón <jtimon@jtimon.cc> | 2017-05-03 18:15:54 +0200 |
commit | 2351a064a604f5aa961a38a3920289546dada16f (patch) | |
tree | 6878027b39f34a4de14fa14b89304e11be322357 /src/test/versionbits_tests.cpp | |
parent | f87f3626e35e7edae37e14f5156809325ad18cb2 (diff) |
Chainparams: Get rid of CChainParams& Params(std::string)
Diffstat (limited to 'src/test/versionbits_tests.cpp')
-rw-r--r-- | src/test/versionbits_tests.cpp | 6 |
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; |