mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-25 19:31:32 +02:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user