diff --git a/src/llmq/utils.cpp b/src/llmq/utils.cpp index aa0c8cdcf6..d2565efe54 100644 --- a/src/llmq/utils.cpp +++ b/src/llmq/utils.cpp @@ -723,7 +723,6 @@ bool IsMNRewardReallocationActive(const CBlockIndex* pindex) { assert(pindex); if (!IsV20Active(pindex)) return false; - if (Params().NetworkIDString() == CBaseChainParams::TESTNET) return IsV20Active(pindex); // TODO remove this before re-hardforking testnet to check EHF LOCK(cs_llmq_vbc); return VersionBitsState(pindex, Params().GetConsensus(), Consensus::DEPLOYMENT_MN_RR, llmq_versionbitscache) == ThresholdState::ACTIVE; diff --git a/src/masternode/payments.cpp b/src/masternode/payments.cpp index 0534d3e7a3..44ef1068d6 100644 --- a/src/masternode/payments.cpp +++ b/src/masternode/payments.cpp @@ -35,10 +35,6 @@ if (llmq::utils::IsMNRewardReallocationActive(pindexPrev)) { CAmount masternodeSubsidyReward = GetMasternodePayment(nBlockHeight, blockSubsidy, fV20Active); - // TODO remove this when we re-organize testnet - if (Params().NetworkIDString() == CBaseChainParams::TESTNET) { - masternodeSubsidyReward = masternodeReward; - } const CAmount platformReward = MasternodePayments::PlatformShare(masternodeSubsidyReward); masternodeReward -= platformReward; diff --git a/src/validation.cpp b/src/validation.cpp index 5fc33de6d3..f749d3e1e1 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1129,8 +1129,7 @@ static std::pair GetBlockSubsidyHelper(int nPrevBits, int nPre dDiff = ConvertBitsToDouble(nPrevBits); } - // TODO remove "not testnet" condition when we re-organize testnet - if (fV20Active && Params().NetworkIDString() != CBaseChainParams::TESTNET) { + if (fV20Active) { // Starting from V20 Activation, subsidybase should be stable. // Currently, nSubsidyBase calculate relies on difficulty. // Once Platform is live, it must constantly get blocks difficulty in order to calculate platformReward. @@ -1172,8 +1171,6 @@ static std::pair GetBlockSubsidyHelper(int nPrevBits, int nPre // Hard fork to reduce the block reward by 10 extra percent (allowing budget/superblocks) if (nPrevHeight > consensusParams.nBudgetPaymentsStartBlock) { // Once v20 is active, the treasury is 20% instead of 10% - // TODO remove this when we re-organize testnet - if (Params().NetworkIDString() == CBaseChainParams::TESTNET) fV20Active = false; nSuperblockPart = nSubsidy / (fV20Active ? 5 : 10); } return {nSubsidy - nSuperblockPart, nSuperblockPart}; @@ -1231,8 +1228,6 @@ CAmount GetMasternodePayment(int nHeight, CAmount blockValue, bool fV20Active) return ret; } - // TODO remove this when we re-organize testnet - if (Params().NetworkIDString() == CBaseChainParams::TESTNET) fV20Active = false; if (fV20Active) { // Once MNRewardReallocated activates, block reward is 80% of block subsidy (+ tx fees) since treasury is 20% // Since the MN reward needs to be equal to 60% of the block subsidy (according to the proposal), MN reward is set to 75% of the block reward. @@ -2400,8 +2395,7 @@ bool CChainState::ConnectBlock(const CBlock& block, BlockValidationState& state, int64_t nTime5_2 = GetTimeMicros(); nTimeSubsidy += nTime5_2 - nTime5_1; LogPrint(BCLog::BENCHMARK, " - GetBlockSubsidy: %.2fms [%.2fs (%.2fms/blk)]\n", MILLI * (nTime5_2 - nTime5_1), nTimeSubsidy * MICRO, nTimeSubsidy * MILLI / nBlocksTotal); - // TODO remove "if testnet" condition when we re-organize testnet - if (!CheckCreditPoolDiffForBlock(block, pindex, m_params.GetConsensus(), (m_params.NetworkIDString() == CBaseChainParams::TESTNET) ? (blockSubsidy + feeReward) : blockSubsidy, state)) { + if (!CheckCreditPoolDiffForBlock(block, pindex, m_params.GetConsensus(), blockSubsidy, state)) { return error("ConnectBlock(DASH): CheckCreditPoolDiffForBlock for block %s failed with %s", pindex->GetBlockHash().ToString(), state.ToString()); }