diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 7967199ae2..1f9224afd5 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -438,7 +438,7 @@ class CMainParams : public CChainParams { consensus.evoSporkKeyID = "a78fERshquPsTv2TuKMSsxTeKom56uBwLP"; consensus.nEvoSporkStartBlock = ZC_LELANTUS_STARTING_BLOCK; - consensus.nEvoSporkStopBlock = AdjustEndingBlockNumberAfterSubsidyHalving(ZC_LELANTUS_STARTING_BLOCK, 2*24*12*365, 486221); // two years after lelantus + consensus.nEvoSporkStopBlock = AdjustEndingBlockNumberAfterSubsidyHalving(ZC_LELANTUS_STARTING_BLOCK, 2*24*12*365, 486221); // =608035, two years after lelantus consensus.nEvoSporkStopBlockExtensionVersion = 140903; consensus.nEvoSporkStopBlockPrevious = ZC_LELANTUS_STARTING_BLOCK + 1*24*12*365; // one year after lelantus consensus.nEvoSporkStopBlockExtensionGracefulPeriod = 24*12*14; // two weeks diff --git a/src/test/main_tests.cpp b/src/test/main_tests.cpp index 299e206e7d..f4352ed396 100644 --- a/src/test/main_tests.cpp +++ b/src/test/main_tests.cpp @@ -46,29 +46,35 @@ BOOST_AUTO_TEST_CASE(subsidy_limit_test) { Consensus::Params consensusParams = Params(CBaseChainParams::MAIN).GetConsensus(); CAmount nSum = 0; - const int nMTPFirstBlock = 117564; - int lastHalving = (consensusParams.nSubsidyHalvingStopBlock - consensusParams.nSubsidyHalvingFirst)/consensusParams.nSubsidyHalvingInterval; - int lastHalvingBlock = consensusParams.nSubsidyHalvingFirst + lastHalving*consensusParams.nSubsidyHalvingInterval; + int lastHalving = (consensusParams.nSubsidyHalvingStopBlock - consensusParams.nSubsidyHalvingSecond)/consensusParams.nSubsidyHalvingInterval; + int lastHalvingBlock = consensusParams.nSubsidyHalvingSecond + lastHalving*consensusParams.nSubsidyHalvingInterval; int step = 1; for(int nHeight = 0; nHeight < 14000000; nHeight += step) { - if (nHeight == consensusParams.nSubsidyHalvingFirst) + if (nHeight == consensusParams.nSubsidyHalvingSecond) step = 1000; else if (nHeight == lastHalvingBlock) step = 1; else if (nHeight == consensusParams.nSubsidyHalvingStopBlock) step = 10000; - CAmount nSubsidy = GetBlockSubsidy(nHeight, consensusParams, nHeight