aboutsummaryrefslogtreecommitdiff
path: root/src/test/validation_tests.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-09-24 15:11:27 +0200
committerMarcoFalke <falke.marco@gmail.com>2020-09-29 10:20:05 +0200
commitfa23308e9aad70c99a31f91d8556f1876ea02c04 (patch)
treeb506f748bfb0d71bde4c34500abf0bc0455040b6 /src/test/validation_tests.cpp
parente36aa351a31cde0f95ce957b2ff593a97f91eb6d (diff)
Remove gArgs global from CreateChainParams to aid testing
Diffstat (limited to 'src/test/validation_tests.cpp')
-rw-r--r--src/test/validation_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/validation_tests.cpp b/src/test/validation_tests.cpp
index 3b961db52d..aff7b7ca3e 100644
--- a/src/test/validation_tests.cpp
+++ b/src/test/validation_tests.cpp
@@ -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());