From 38a83007e827b4585e04f23f838bbf1eef4bf7a6 Mon Sep 17 00:00:00 2001 From: langerhans Date: Fri, 31 Jul 2015 21:23:27 +0200 Subject: Move COINBASE_MATURITY to the consensus parameters --- src/main.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/main.cpp') 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), -- cgit v1.2.3