diff --git a/src/miner.cpp b/src/miner.cpp index 30ec62a..8eacd42 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -230,14 +230,20 @@ std::unique_ptr BlockAssembler::CreateNewBlock(const CScript& sc nValueNodeRewards += coinbaseTx.vout[SN_PMT_SLOT].nValue; } - if(Params().NetworkIDString() == CBaseChainParams::TESTNET && !budget.IsBudgetPaymentBlock(pindexPrev->nHeight + 1)){ + if(Params().NetworkIDString() == CBaseChainParams::TESTNET){ //Reduce PoS reward by the node rewards - if(txCoinStake.nVersion >= TX_ELE_VERSION) - txCoinStake.vpout[0].nValue = GetBlockValue(nHeight, nFees) - nValueNodeRewards; - else - txCoinStake.vout[0].nValue = GetBlockValue(nHeight, nFees) - nValueNodeRewards; + LogPrintf("%s: 3333333333333 \n",__func__); + + if (!budget.IsBudgetPaymentBlock(nHeight)){ + if(txCoinStake.nVersion >= TX_ELE_VERSION) + txCoinStake.vpout[0].nValue = GetBlockValue(nHeight, nFees) - nValueNodeRewards; + else + txCoinStake.vout[0].nValue = GetBlockValue(nHeight, nFees) - nValueNodeRewards; + } } - else if (!(IsSporkActive(SPORK_13_ENABLE_SUPERBLOCKS) && budget.IsBudgetPaymentBlock(pindexPrev->nHeight + 1))){ + else if (!(IsSporkActive(SPORK_13_ENABLE_SUPERBLOCKS) && budget.IsBudgetPaymentBlock(nHeight))){ + LogPrintf("%s: 4444444 \n",__func__); + //Reduce PoS reward by the node rewards if(txCoinStake.nVersion >= TX_ELE_VERSION) txCoinStake.vpout[0].nValue = GetBlockValue(nHeight, nFees) - nValueNodeRewards;