aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoss Nicoll <[email protected]>2014-04-20 11:39:21 +0100
committerPatrick Lodder <[email protected]>2014-04-20 16:33:36 +0400
commite1ce43df71b751e84886ae5b8f4e4a88cf1aa76a (patch)
tree1d3bbea07be07acc5577e495d2beefef12c2c186 /src
parentMerge pull request #475 from patricklodder/1.7-dev-travis-fixes (diff)
downloaddiscoin-e1ce43df71b751e84886ae5b8f4e4a88cf1aa76a.tar.xz
discoin-e1ce43df71b751e84886ae5b8f4e4a88cf1aa76a.zip
Corrected block maturity test.
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp6
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());
}