mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Remove gArgs global from CreateChainParams to aid testing
This commit is contained in:
@@ -39,7 +39,7 @@ static void TestBlockSubsidyHalvings(int nSubsidyHalvingInterval)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(block_subsidy_test)
|
||||
{
|
||||
const auto chainParams = CreateChainParams(CBaseChainParams::MAIN);
|
||||
const auto chainParams = CreateChainParams(*m_node.args, CBaseChainParams::MAIN);
|
||||
TestBlockSubsidyHalvings(chainParams->GetConsensus()); // As in main
|
||||
TestBlockSubsidyHalvings(150); // As in regtest
|
||||
TestBlockSubsidyHalvings(1000); // Just another interval
|
||||
@@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE(block_subsidy_test)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(subsidy_limit_test)
|
||||
{
|
||||
const auto chainParams = CreateChainParams(CBaseChainParams::MAIN);
|
||||
const auto chainParams = CreateChainParams(*m_node.args, CBaseChainParams::MAIN);
|
||||
CAmount nSum = 0;
|
||||
for (int nHeight = 0; nHeight < 14000000; nHeight += 1000) {
|
||||
CAmount nSubsidy = GetBlockSubsidy(nHeight, chainParams->GetConsensus());
|
||||
|
||||
Reference in New Issue
Block a user