diff --git a/src/amount.h b/src/amount.h index 1ea6235df..daa4c7c54 100644 --- a/src/amount.h +++ b/src/amount.h @@ -23,7 +23,7 @@ static const CAmount CENT = 1000000; * critical; in unusual circumstances like a(nother) overflow bug that allowed * for the creation of coins out of thin air modification could lead to a fork. * */ -static const CAmount MAX_MONEY = 84000000 * COIN; +static const CAmount MAX_MONEY = 16 * 84000000 * COIN; inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); } #endif // BITCOIN_AMOUNT_H diff --git a/src/chainparams.cpp b/src/chainparams.cpp index c2ac41f4b..ca1fccee8 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -79,7 +79,7 @@ class CMainParams : public CChainParams { public: CMainParams() { strNetworkID = "main"; - consensus.nSubsidyHalvingInterval = 840000 * 4; + consensus.nSubsidyHalvingInterval = 13440000; consensus.BIP16Height = 1; consensus.BIP34Height = 0; consensus.BIP34Hash = uint256S("0x581cc1e4153a2a367012d3678f0f83f7d62286d84e69ab860804acf3ff2f572b"); // Genesis diff --git a/src/test/main_tests.cpp b/src/test/main_tests.cpp index efba85b03..77bbce670 100644 --- a/src/test/main_tests.cpp +++ b/src/test/main_tests.cpp @@ -49,13 +49,13 @@ BOOST_AUTO_TEST_CASE(subsidy_limit_test) { const auto chainParams = CreateChainParams(CBaseChainParams::MAIN); CAmount nSum = 0; - for (int nHeight = 0; nHeight < 56000000; nHeight += 1000) { + for (int nHeight = 0; nHeight < 56000000 * 4; nHeight += 1000) { CAmount nSubsidy = GetBlockSubsidy(nHeight, chainParams->GetConsensus()); BOOST_CHECK(nSubsidy <= 50 * COIN); nSum += nSubsidy * 1000; BOOST_CHECK(MoneyRange(nSum)); } - BOOST_CHECK_EQUAL(nSum, 8399999990760000ULL); + BOOST_CHECK_EQUAL(nSum, 134398632762240000ULL); } bool ReturnFalse() { return false; }