Corrected block maturity test.
This commit is contained in:
parent
f21ed2c0b0
commit
e1ce43df71
|
@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue