From 98e645d274cde0ca77d554c4acdd35e80caf89b7 Mon Sep 17 00:00:00 2001 From: Donald Adu-Poku Date: Tue, 30 Oct 2018 20:11:31 +0000 Subject: [PATCH] rpcserver: Fix verify progress calculation. --- rpcserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcserver.go b/rpcserver.go index 55a0f227..e3b556a2 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -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.