aboutsummaryrefslogtreecommitdiff
path: root/src/auxpow.cpp
diff options
context:
space:
mode:
authorRoss Nicoll <[email protected]>2015-07-31 20:45:56 +0100
committerRoss Nicoll <[email protected]>2015-07-31 20:45:56 +0100
commitd988dc7ba0eecf4bdefb38287ddc0e2b49031fc6 (patch)
tree3b2c3ecf53e68f96056a30146b12bb758a32d143 /src/auxpow.cpp
parentMerge pull request #1204 from rnicoll/1.10-fees (diff)
parentMove COINBASE_MATURITY to the consensus parameters (diff)
downloaddiscoin-d988dc7ba0eecf4bdefb38287ddc0e2b49031fc6.tar.xz
discoin-d988dc7ba0eecf4bdefb38287ddc0e2b49031fc6.zip
Merge pull request #1213 from langerhans/1.10-dev-maturity
Minor fixes to concensus relevant parameters
Diffstat (limited to 'src/auxpow.cpp')
-rw-r--r--src/auxpow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/auxpow.cpp b/src/auxpow.cpp
index 3c350a67a..7356d0202 100644
--- a/src/auxpow.cpp
+++ b/src/auxpow.cpp
@@ -7,6 +7,7 @@
#include "auxpow.h"
+#include "chainparams.h"
#include "consensus/validation.h"
#include "main.h"
#include "script/script.h"
@@ -89,7 +90,8 @@ int CMerkleTx::GetBlocksToMaturity() const
{
if (!IsCoinBase())
return 0;
- return std::max(0, (COINBASE_MATURITY + 1) - GetDepthInMainChain());
+ int nCoinbaseMaturity = Params().GetConsensus(chainActive.Height()).nCoinbaseMaturity;
+ return std::max(0, (nCoinbaseMaturity + 1) - GetDepthInMainChain());
}