diff options
| author | Ross Nicoll <[email protected]> | 2018-01-08 19:39:10 +0000 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2018-09-19 21:09:16 +0100 |
| commit | 7b81f4de0a006a6c01b88c79b6ab34a921eb86b5 (patch) | |
| tree | 71f86cbdb71ef365ec893073d63f05ccfe1f8252 /src/auxpow.cpp | |
| parent | Check only the base block version (#1411) (diff) | |
| download | discoin-7b81f4de0a006a6c01b88c79b6ab34a921eb86b5.tar.xz discoin-7b81f4de0a006a6c01b88c79b6ab34a921eb86b5.zip | |
Move COINBASE_MATURITY to the consensus parameters (#1426)
Diffstat (limited to 'src/auxpow.cpp')
| -rw-r--r-- | src/auxpow.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/auxpow.cpp b/src/auxpow.cpp index 46fe6f650..56b919d3b 100644 --- a/src/auxpow.cpp +++ b/src/auxpow.cpp @@ -7,6 +7,7 @@ #include "auxpow.h" +#include "chainparams.h" #include "compat/endian.h" #include "consensus/consensus.h" #include "consensus/merkle.h" @@ -64,7 +65,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()); } |