mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-13 00:28:03 +00:00
Increased total supply to: 1344000000.
Fixed subsidy test case.
This commit is contained in:
parent
d5ca3d6bd1
commit
e4376fdcb5
@ -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
|
||||
|
@ -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
|
||||
|
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user