Skip to content

Commit

Permalink
Merge pull request #121 from BlockMechanic/segwit
Browse files Browse the repository at this point in the history
Update miner.cpp
  • Loading branch information
BlockMechanic authored Oct 6, 2022
2 parents d18dcf8 + 7dde483 commit 5824ab3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,14 @@ 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)) || (!(IsSporkActive(SPORK_13_ENABLE_SUPERBLOCKS) && budget.IsBudgetPaymentBlock(pindexPrev->nHeight + 1)))){
if(Params().NetworkIDString() == CBaseChainParams::TESTNET && !budget.IsBudgetPaymentBlock(pindexPrev->nHeight + 1)){
//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;
}
else if (!(IsSporkActive(SPORK_13_ENABLE_SUPERBLOCKS) && budget.IsBudgetPaymentBlock(pindexPrev->nHeight + 1))){
//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 5824ab3

Please sign in to comment.