Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip initial roughtime result when EnableRoughtime is disabled #7221

Merged
merged 2 commits into from
Sep 13, 2020

Conversation

terencechain
Copy link
Member

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?
Even when EnableRoughtime was disabled, it still runs through the following code:

	// Log Debug Results.
	for _, res := range results {
		if res.Error() != nil {
			log.Errorf("Could not get rough time result: %v", res.Error())
			continue
		}
		log.WithFields(logrus.Fields{
			"Server Name": res.Server.Name,
			"Midpoint":    res.Midpoint,
			"Delay":       res.Delay,
			"Radius":      res.Roughtime.Radius,
		}).Debug("Response received from roughtime server")
	}

This PR makes it exit earlier when EnableRoughtime is false in function recalibrateRoughtime()

Which issues(s) does this PR fix?

Fixes #7183

Other notes for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"validator --version" still talk to rough time service
2 participants