GuessVerificationProgress: cap the ratio to 1
The getblockchaininfo RPC call could sometime return a 'validationprogress' > 1, but this is absurd.
This commit is contained in:
parent
feb1a8c03a
commit
2f5f7d6b13
|
@ -5066,7 +5066,7 @@ double GuessVerificationProgress(const ChainTxData& data, const CBlockIndex *pin
|
|||
fTxTotal = pindex->nChainTx + (nNow - pindex->GetBlockTime()) * data.dTxRate;
|
||||
}
|
||||
|
||||
return pindex->nChainTx / fTxTotal;
|
||||
return std::min<double>(pindex->nChainTx / fTxTotal, 1.0);
|
||||
}
|
||||
|
||||
class CMainCleanup
|
||||
|
|
Loading…
Reference in a new issue