aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
diff options
context:
space:
mode:
authorJorge Timón <jtimon@jtimon.cc>2015-04-01 16:03:11 +0200
committerJorge Timón <jtimon@jtimon.cc>2015-05-15 16:12:30 +0200
commit935bd0a447834fa48c218ddae2a5d835a67979ef (patch)
tree1d45c3edbc3208a22894a2e6bef1743550a5b81c /src/miner.cpp
parentac75bafafdc394f60f819ede18181682eb5aa662 (diff)
downloadbitcoin-935bd0a447834fa48c218ddae2a5d835a67979ef.tar.xz
Chainparams: Refactor: Decouple main::GetBlockValue() from Params() [renamed GetBlockSubsidy]
Remove redundant getter CChainParams::SubsidyHalvingInterval()
Diffstat (limited to 'src/miner.cpp')
-rw-r--r--src/miner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/miner.cpp b/src/miner.cpp
index 4bceb7d7b4..804a688523 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -91,6 +91,7 @@ void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams,
CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
{
+ const CChainParams& chainparams = Params();
// Create new block
auto_ptr<CBlockTemplate> pblocktemplate(new CBlockTemplate());
if(!pblocktemplate.get())
@@ -320,7 +321,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
LogPrintf("CreateNewBlock(): total size %u\n", nBlockSize);
// Compute final coinbase transaction.
- txNew.vout[0].nValue = GetBlockValue(nHeight, nFees);
+ txNew.vout[0].nValue = nFees + GetBlockSubsidy(nHeight, chainparams.GetConsensus());
txNew.vin[0].scriptSig = CScript() << nHeight << OP_0;
pblock->vtx[0] = txNew;
pblocktemplate->vTxFees[0] = -nFees;