Browse Source

Update miner.cpp

pull/4/head
J-Stuhlman 8 years ago
committed by GitHub
parent
commit
25e6382881
  1. 10
      src/miner.cpp

10
src/miner.cpp

@ -339,16 +339,6 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
txNew.vout[0].scriptPubKey = scriptPubKeyIn;
txNew.vout[0].nValue = GetBlockSubsidy(nHeight, chainparams.GetConsensus());
if ((nHeight > 0) && (nHeight <= chainparams.GetConsensus().GetLastFoundersRewardBlockHeight())) {
// Founders reward is 20% of the block subsidy
auto vFoundersReward = txNew.vout[0].nValue / 5;
// Take some reward away from us
txNew.vout[0].nValue -= vFoundersReward;
// And give it to the founders
txNew.vout.push_back(CTxOut(vFoundersReward, chainparams.GetFoundersRewardScriptAtHeight(nHeight)));
}
// Add fees
txNew.vout[0].nValue += nFees;
txNew.vin[0].scriptSig = CScript() << nHeight << OP_0;

Loading…
Cancel
Save