aboutsummaryrefslogtreecommitdiff
path: root/src/auxpow.cpp
diff options
context:
space:
mode:
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());
}