Skip to content

Commit

Permalink
Report percentages for uptimes in platform.getCurrentValidators (av…
Browse files Browse the repository at this point in the history
  • Loading branch information
ceyonur authored Jan 20, 2023
1 parent 00fdbb1 commit 8918a43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vms/platformvm/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -2355,7 +2355,9 @@ func (s *Service) getAPIUptime(staker *state.Staker) (*json.Float32, error) {
if err != nil {
return nil, err
}
uptime := json.Float32(rawUptime)
// Transform this to a percentage (0-100) to make it consistent
// with observedUptime in info.peers API
uptime := json.Float32(rawUptime * 100)
return &uptime, nil
}

Expand Down

0 comments on commit 8918a43

Please sign in to comment.