diff --git a/src/governance.cpp b/src/governance.cpp index 3f589e525..8d942f7cf 100644 --- a/src/governance.cpp +++ b/src/governance.cpp @@ -328,7 +328,7 @@ void CGovernanceManager::ProcessMessage(CNode* pfrom, std::string& strCommand, C std::string strError = ""; int nConf = 0; if(!IsCollateralValid(budgetProposalBroadcast.nFeeTXHash, budgetProposalBroadcast.GetHash(), strError, budgetProposalBroadcast.nTime, nConf, GOVERNANCE_FEE_TX)){ - LogPrintf("Proposal FeeTX is not valid - %s - %s\n", budgetProposalBroadcast.nFeeTXHash.ToString(), strError); + LogPrintf("Governance Object FeeTX is not valid - %s - %s\n", budgetProposalBroadcast.nFeeTXHash.ToString(), strError); if(nConf >= 1) vecImmatureBudgetProposals.push_back(budgetProposalBroadcast); return; } diff --git a/src/main.cpp b/src/main.cpp index f33971bd0..850d025a4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1511,17 +1511,9 @@ CAmount GetBlockSubsidy(int nPrevBits, int nPrevHeight, const Consensus::Params& // LogPrintf("height %u diff %4.2f reward %i \n", nPrevHeight, dDiff, nSubsidy); nSubsidy *= COIN; - // TODO: Remove this to further unify logic among mainnet/testnet/whatevernet, - // use single formula instead (the one that is for current mainnet). - // Probably a good idea to use a significally lower consensusParams.nSubsidyHalvingInterval - // for testnet (like 10 times for example) to see the effect of halving there faster. - // Will require testnet restart. - if(Params().NetworkIDString() == CBaseChainParams::TESTNET){ - for(int i = 46200; i <= nPrevHeight; i += consensusParams.nSubsidyHalvingInterval) nSubsidy -= nSubsidy/14; - } else { - // yearly decline of production by 7.1% per year, projected 21.3M coins max by year 2050. - for(int i = consensusParams.nSubsidyHalvingInterval; i <= nPrevHeight; i += consensusParams.nSubsidyHalvingInterval) nSubsidy -= nSubsidy/14; - } + // updated - 12.1 - unified logic + // yearly decline of production by 7.1% per year, projected 21.3M coins max by year 2050. + for(int i = consensusParams.nSubsidyHalvingInterval; i <= nPrevHeight; i += consensusParams.nSubsidyHalvingInterval) nSubsidy -= nSubsidy/14; // Hard fork to reduce the block reward by 10 extra percent (allowing budget super-blocks) if(nPrevHeight > consensusParams.nBudgetPaymentsStartBlock) nSubsidy -= nSubsidy/10; diff --git a/src/pow.cpp b/src/pow.cpp index 8df9048ed..b92aa6d82 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -140,12 +140,14 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead { unsigned int retarget = DIFF_DGW; - if (Params().NetworkIDString() != CBaseChainParams::TESTNET) { + // mainnet/regtest share a configuration + if (Params().NetworkIDString() == CBaseChainParams::MAIN || Params().NetworkIDString() == CBaseChainParams::REGTEST) { if (pindexLast->nHeight + 1 >= 34140) retarget = DIFF_DGW; else if (pindexLast->nHeight + 1 >= 15200) retarget = DIFF_KGW; else retarget = DIFF_BTC; + // testnet -- we want a lot of coins in existance early on } else { - if (pindexLast->nHeight + 1 >= 2000) retarget = DIFF_DGW; + if (pindexLast->nHeight + 1 >= 3000) retarget = DIFF_DGW; else retarget = DIFF_BTC; } diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp index bfdde337a..bc7609f46 100644 --- a/src/rpcmasternode-budget.cpp +++ b/src/rpcmasternode-budget.cpp @@ -114,7 +114,8 @@ UniValue mngovernance(const UniValue& params, bool fHelp) if(strCommand == "prepare") { - if (params.size() != 7) + printf("%d\n", params.size()); + if (params.size() != 6) throw JSONRPCError(RPC_INVALID_PARAMETER, "Correct usage is 'mngovernance prepare