aboutsummaryrefslogtreecommitdiff
path: root/src/test/dogecoin_tests.cpp
diff options
context:
space:
mode:
authorTomo Ueda <[email protected]>2021-09-02 12:55:18 -0700
committerTomo Ueda <[email protected]>2021-09-02 12:55:18 -0700
commite64843ced509c24f783276d4cc0f2f26c9d527f2 (patch)
tree7956d4ea416c5b3a531dbc6f356e1c9a643d9690 /src/test/dogecoin_tests.cpp
parentreally s/doge/dis/g this time (diff)
downloaddiscoin-e64843ced509c24f783276d4cc0f2f26c9d527f2.tar.xz
discoin-e64843ced509c24f783276d4cc0f2f26c9d527f2.zip
really s/Doge/Dis/g this time
Diffstat (limited to 'src/test/dogecoin_tests.cpp')
-rw-r--r--src/test/dogecoin_tests.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/test/dogecoin_tests.cpp b/src/test/dogecoin_tests.cpp
index 01a9b7eb0..5c38142e3 100644
--- a/src/test/dogecoin_tests.cpp
+++ b/src/test/dogecoin_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Dogecoin Core developers
+// Copyright (c) 2015 The Discoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -66,7 +66,7 @@ BOOST_AUTO_TEST_CASE(subsidy_first_100k_test)
for (int nHeight = 0; nHeight <= 100000; nHeight++) {
const Consensus::Params& params = mainParams.GetConsensus(nHeight);
- CAmount nSubsidy = GetDogecoinBlockSubsidy(nHeight, params, ArithToUint256(prevHash));
+ CAmount nSubsidy = GetDiscoinBlockSubsidy(nHeight, params, ArithToUint256(prevHash));
BOOST_CHECK(MoneyRange(nSubsidy));
BOOST_CHECK(nSubsidy <= 1000000 * COIN);
nSum += nSubsidy;
@@ -86,7 +86,7 @@ BOOST_AUTO_TEST_CASE(subsidy_100k_145k_test)
for (int nHeight = 100000; nHeight <= 145000; nHeight++) {
const Consensus::Params& params = mainParams.GetConsensus(nHeight);
- CAmount nSubsidy = GetDogecoinBlockSubsidy(nHeight, params, ArithToUint256(prevHash));
+ CAmount nSubsidy = GetDiscoinBlockSubsidy(nHeight, params, ArithToUint256(prevHash));
BOOST_CHECK(MoneyRange(nSubsidy));
BOOST_CHECK(nSubsidy <= 500000 * COIN);
nSum += nSubsidy;
@@ -106,17 +106,17 @@ BOOST_AUTO_TEST_CASE(subsidy_post_145k_test)
for (int nHeight = 145000; nHeight < 600000; nHeight++) {
const Consensus::Params& params = mainParams.GetConsensus(nHeight);
- CAmount nSubsidy = GetDogecoinBlockSubsidy(nHeight, params, prevHash);
+ CAmount nSubsidy = GetDiscoinBlockSubsidy(nHeight, params, prevHash);
CAmount nExpectedSubsidy = (500000 >> (nHeight / 100000)) * COIN;
BOOST_CHECK(MoneyRange(nSubsidy));
BOOST_CHECK_EQUAL(nSubsidy, nExpectedSubsidy);
}
// Test reward at 600k+ is constant
- CAmount nConstantSubsidy = GetDogecoinBlockSubsidy(600000, mainParams.GetConsensus(600000), prevHash);
+ CAmount nConstantSubsidy = GetDiscoinBlockSubsidy(600000, mainParams.GetConsensus(600000), prevHash);
BOOST_CHECK_EQUAL(nConstantSubsidy, 10000 * COIN);
- nConstantSubsidy = GetDogecoinBlockSubsidy(700000, mainParams.GetConsensus(700000), prevHash);
+ nConstantSubsidy = GetDiscoinBlockSubsidy(700000, mainParams.GetConsensus(700000), prevHash);
BOOST_CHECK_EQUAL(nConstantSubsidy, 10000 * COIN);
}
@@ -131,7 +131,7 @@ BOOST_AUTO_TEST_CASE(get_next_work_difficulty_limit)
pindexLast.nHeight = 239;
pindexLast.nTime = 1386475638; // Block #239
pindexLast.nBits = 0x1e0ffff0;
- BOOST_CHECK_EQUAL(CalculateDogecoinNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1e00ffff);
+ BOOST_CHECK_EQUAL(CalculateDiscoinNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1e00ffff);
}
BOOST_AUTO_TEST_CASE(get_next_work_pre_digishield)
@@ -145,7 +145,7 @@ BOOST_AUTO_TEST_CASE(get_next_work_pre_digishield)
pindexLast.nHeight = 9599;
pindexLast.nTime = 1386954113;
pindexLast.nBits = 0x1c1a1206;
- BOOST_CHECK_EQUAL(CalculateDogecoinNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1c15ea59);
+ BOOST_CHECK_EQUAL(CalculateDiscoinNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1c15ea59);
}
BOOST_AUTO_TEST_CASE(get_next_work_digishield)
@@ -160,7 +160,7 @@ BOOST_AUTO_TEST_CASE(get_next_work_digishield)
pindexLast.nHeight = 145000;
pindexLast.nTime = 1395094679;
pindexLast.nBits = 0x1b499dfd;
- BOOST_CHECK_EQUAL(CalculateDogecoinNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1b671062);
+ BOOST_CHECK_EQUAL(CalculateDiscoinNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1b671062);
}
BOOST_AUTO_TEST_CASE(get_next_work_digishield_modulated_upper)
@@ -175,7 +175,7 @@ BOOST_AUTO_TEST_CASE(get_next_work_digishield_modulated_upper)
pindexLast.nHeight = 145107;
pindexLast.nTime = 1395101360;
pindexLast.nBits = 0x1b3439cd;
- BOOST_CHECK_EQUAL(CalculateDogecoinNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1b4e56b3);
+ BOOST_CHECK_EQUAL(CalculateDiscoinNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1b4e56b3);
}
BOOST_AUTO_TEST_CASE(get_next_work_digishield_modulated_lower)
@@ -190,7 +190,7 @@ BOOST_AUTO_TEST_CASE(get_next_work_digishield_modulated_lower)
pindexLast.nHeight = 149423;
pindexLast.nTime = 1395380447;
pindexLast.nBits = 0x1b446f21;
- BOOST_CHECK_EQUAL(CalculateDogecoinNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1b335358);
+ BOOST_CHECK_EQUAL(CalculateDiscoinNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1b335358);
}
BOOST_AUTO_TEST_CASE(get_next_work_digishield_rounding)
@@ -206,7 +206,7 @@ BOOST_AUTO_TEST_CASE(get_next_work_digishield_rounding)
pindexLast.nHeight = 145001;
pindexLast.nTime = 1395094727;
pindexLast.nBits = 0x1b671062;
- BOOST_CHECK_EQUAL(CalculateDogecoinNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1b6558a4);
+ BOOST_CHECK_EQUAL(CalculateDiscoinNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1b6558a4);
}
BOOST_AUTO_TEST_CASE(hardfork_parameters)