mirror of
https://github.com/FlipsideCrypto/dcrd.git
synced 2026-02-06 19:06:51 +00:00
rpcserver: Fix verify progress calculation.
This commit is contained in:
parent
7a45a5f1d6
commit
98e645d274
@ -1923,7 +1923,7 @@ func handleGetBlockchainInfo(s *rpcServer, cmd interface{}, closeChan <-chan str
|
||||
syncHeight := s.server.blockManager.SyncHeight()
|
||||
var verifyProgress float64
|
||||
if syncHeight > 0 {
|
||||
verifyProgress = float64(best.Height) / float64(syncHeight)
|
||||
verifyProgress = math.Min(float64(best.Height)/float64(syncHeight), 1.0)
|
||||
}
|
||||
|
||||
// Fetch the maximum allowed block size.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user