Skip to content

Commit

Permalink
Merge pull request #123 from BlockMechanic/segwit
Browse files Browse the repository at this point in the history
Update miner.cpp
  • Loading branch information
BlockMechanic authored Oct 7, 2022
2 parents 1eddde2 + 515ffbb commit 6bf1e64
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,20 @@ std::unique_ptr<CBlockTemplate> 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;
Expand Down

0 comments on commit 6bf1e64

Please sign in to comment.