diff options
| author | Ross Nicoll <[email protected]> | 2014-04-20 11:39:21 +0100 |
|---|---|---|
| committer | Patrick Lodder <[email protected]> | 2014-04-20 16:33:36 +0400 |
| commit | e1ce43df71b751e84886ae5b8f4e4a88cf1aa76a (patch) | |
| tree | 1d3bbea07be07acc5577e495d2beefef12c2c186 /src | |
| parent | Merge pull request #475 from patricklodder/1.7-dev-travis-fixes (diff) | |
| download | discoin-e1ce43df71b751e84886ae5b8f4e4a88cf1aa76a.tar.xz discoin-e1ce43df71b751e84886ae5b8f4e4a88cf1aa76a.zip | |
Corrected block maturity test.
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index b5302a9bf..dac145148 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -936,7 +936,11 @@ int CMerkleTx::GetBlocksToMaturity() const { if (!IsCoinBase()) return 0; - return max(0, (COINBASE_MATURITY+1) - GetDepthInMainChain()); + + if(GetDepthInMainChain() >= COINBASE_MATURITY_SWITCH) + return max(0, (COINBASE_MATURITY_NEW+20) - GetDepthInMainChain()); + else + return max(0, (COINBASE_MATURITY+20) - GetDepthInMainChain()); } |