mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +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:
parent
feb1a8c03a
commit
2f5f7d6b13
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue