From b682fcb8d6eca23105b8d4ed1c726c539f2a3a36 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Sun, 6 Mar 2016 18:07:30 +0300 Subject: [PATCH] Fix GetBlockSubsidy for regtest, bump regtest settings Closes #719 --- src/chainparams.cpp | 6 +++--- src/main.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 00307f72a..a7dc5f0bf 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -269,9 +269,9 @@ public: CRegTestParams() { strNetworkID = "regtest"; consensus.nSubsidyHalvingInterval = 150; - consensus.nMasternodePaymentsStartBlock = 40; - consensus.nMasternodePaymentsIncreaseBlock = 50; - consensus.nMasternodePaymentsIncreasePeriod = 100; + consensus.nMasternodePaymentsStartBlock = 240; + consensus.nMasternodePaymentsIncreaseBlock = 350; + consensus.nMasternodePaymentsIncreasePeriod = 10; consensus.nBudgetPaymentsStartBlock = 1000; consensus.nBudgetPaymentsCycleBlocks = 50; consensus.nBudgetPaymentsWindowBlocks = 100; diff --git a/src/main.cpp b/src/main.cpp index 834c78991..22913a76a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1503,7 +1503,7 @@ CAmount GetBlockSubsidy(int nPrevBits, int nPrevHeight, const Consensus::Params& double dDiff = (double)0x0000ffff / (double)(nPrevBits & 0x00ffffff); /* fixed bug caused diff to not be correctly calculated */ - if(nPrevHeight > 4500 || Params().NetworkIDString() == CBaseChainParams::TESTNET) dDiff = ConvertBitsToDouble(nPrevBits); + if(nPrevHeight > 4500 || Params().NetworkIDString() != CBaseChainParams::MAIN) dDiff = ConvertBitsToDouble(nPrevBits); CAmount nSubsidy = 0; if(nPrevHeight >= 5465) {