diff options
| author | Ross Nicoll <[email protected]> | 2015-06-25 11:28:31 +0100 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2019-04-03 05:16:26 +0000 |
| commit | 9b494d566caa8d3cd6193bbc80ddac10541b0168 (patch) | |
| tree | 1369169da3480374f31974fa118fd393478f5786 /src/validation.cpp | |
| parent | Replace consensus values with Dogecoin equivalents (diff) | |
| download | discoin-9b494d566caa8d3cd6193bbc80ddac10541b0168.tar.xz discoin-9b494d566caa8d3cd6193bbc80ddac10541b0168.zip | |
Add Dogecoin block subsidy calculations.
Diffstat (limited to 'src/validation.cpp')
| -rw-r--r-- | src/validation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index 860a3fd3c..c14db2454 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -15,6 +15,7 @@ #include <consensus/tx_verify.h> #include <consensus/validation.h> #include <cuckoocache.h> +#include <dogecoin.h> #include <hash.h> #include <index/txindex.h> #include <policy/fees.h> @@ -2050,7 +2051,7 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl int64_t nTime3 = GetTimeMicros(); nTimeConnect += nTime3 - nTime2; LogPrint(BCLog::BENCH, " - Connect %u transactions: %.2fms (%.3fms/tx, %.3fms/txin) [%.2fs (%.2fms/blk)]\n", (unsigned)block.vtx.size(), MILLI * (nTime3 - nTime2), MILLI * (nTime3 - nTime2) / block.vtx.size(), nInputs <= 1 ? 0 : MILLI * (nTime3 - nTime2) / (nInputs-1), nTimeConnect * MICRO, nTimeConnect * MILLI / nBlocksTotal); - CAmount blockReward = nFees + GetBlockSubsidy(pindex->nHeight, chainparams.GetConsensus()); + CAmount blockReward = nFees + GetDogecoinBlockSubsidy(pindex->nHeight, chainparams.GetConsensus(), hashPrevBlock); if (block.vtx[0]->GetValueOut() > blockReward) return state.DoS(100, error("ConnectBlock(): coinbase pays too much (actual=%d vs limit=%d)", |