rpcserver: Fix verify progress calculation.

This commit is contained in:
Donald Adu-Poku 2018-10-30 20:11:31 +00:00
parent 7a45a5f1d6
commit 98e645d274

View File

@ -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.