diff options
| author | langerhans <[email protected]> | 2015-07-31 21:23:27 +0200 |
|---|---|---|
| committer | langerhans <[email protected]> | 2015-07-31 21:29:43 +0200 |
| commit | 38a83007e827b4585e04f23f838bbf1eef4bf7a6 (patch) | |
| tree | f47a68b74366aea7824977d019a561554f4a8de1 /src/auxpow.cpp | |
| parent | Make RegTest use simplified rewards for easier test vector setup and use shor... (diff) | |
| download | discoin-38a83007e827b4585e04f23f838bbf1eef4bf7a6.tar.xz discoin-38a83007e827b4585e04f23f838bbf1eef4bf7a6.zip | |
Move COINBASE_MATURITY to the consensus parameters
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 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()); } |