aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorlangerhans <[email protected]>2015-07-31 21:23:27 +0200
committerlangerhans <[email protected]>2015-07-31 21:29:43 +0200
commit38a83007e827b4585e04f23f838bbf1eef4bf7a6 (patch)
treef47a68b74366aea7824977d019a561554f4a8de1 /src/main.cpp
parentMake RegTest use simplified rewards for easier test vector setup and use shor... (diff)
downloaddiscoin-38a83007e827b4585e04f23f838bbf1eef4bf7a6.tar.xz
discoin-38a83007e827b4585e04f23f838bbf1eef4bf7a6.zip
Move COINBASE_MATURITY to the consensus parameters
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index b42638096..1cae88d2a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1446,9 +1446,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
// If prev is coinbase, check that it's matured
if (coins->IsCoinBase()) {
// Dogecoin: Switch maturity at depth 145,000
- int nCoinbaseMaturity = coins->nHeight < COINBASE_MATURITY_SWITCH
- ? COINBASE_MATURITY_OLD
- : COINBASE_MATURITY;
+ int nCoinbaseMaturity = Params().GetConsensus(coins->nHeight).nCoinbaseMaturity;
if (nSpendHeight - coins->nHeight < nCoinbaseMaturity)
return state.Invalid(
error("CheckInputs(): tried to spend coinbase at depth %d", nSpendHeight - coins->nHeight),