aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorRoss Nicoll <[email protected]>2015-06-25 11:28:31 +0100
committerRoss Nicoll <[email protected]>2018-09-19 19:21:49 +0100
commit8c0468c2d227e484f36ff24e3e420ad84312203a (patch)
tree04a65bbfdc89d768341faa7a5a011482dec53402 /src/validation.cpp
parentReplace consensus values with Dogecoin equivalents (diff)
downloaddiscoin-8c0468c2d227e484f36ff24e3e420ad84312203a.tar.xz
discoin-8c0468c2d227e484f36ff24e3e420ad84312203a.zip
Add Dogecoin block subsidy calculations.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index fd761460a..8134f2091 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -12,6 +12,7 @@
#include "consensus/consensus.h"
#include "consensus/merkle.h"
#include "consensus/validation.h"
+#include "dogecoin.h"
#include "hash.h"
#include "init.h"
#include "policy/fees.h"
@@ -1932,7 +1933,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
int64_t nTime3 = GetTimeMicros(); nTimeConnect += nTime3 - nTime2;
LogPrint("bench", " - Connect %u transactions: %.2fms (%.3fms/tx, %.3fms/txin) [%.2fs]\n", (unsigned)block.vtx.size(), 0.001 * (nTime3 - nTime2), 0.001 * (nTime3 - nTime2) / block.vtx.size(), nInputs <= 1 ? 0 : 0.001 * (nTime3 - nTime2) / (nInputs-1), nTimeConnect * 0.000001);
- 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)",