Skip to content

Conversation

@JonathanOppenheimer
Copy link
Member

Reverts #4333

Copilot AI review requested due to automatic review settings October 1, 2025 17:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reverts a previous change that removed the UptimeManager#IsConnected method and replaced it with direct peer tracking. The revert restores the original uptime manager-based connection checking.

  • Restores IsConnected method to the uptime manager interface and implementation
  • Removes peer tracking functionality from the network layer
  • Adds test coverage for the restored IsConnected method

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
vms/platformvm/service.go Reverts to using uptimeManager.IsConnected() instead of direct peer tracking
vms/platformvm/network/network.go Removes peers field and Peers() method from Network struct
snow/uptime/manager_test.go Adds test cases for IsConnected method behavior
snow/uptime/manager.go Adds IsConnected method to Tracker interface
network/p2p/network_test.go Removes test for Peers.Has() method
network/p2p/network.go Removes Has() method from Peers struct
Comments suppressed due to low confidence (1)

network/p2p/network.go:50

  • The NewNetwork function signature has been changed to use variadic ConnectionHandler parameters, but the calling code in vms/platformvm/network/network.go is still trying to pass a peers parameter. This will cause a compilation error.
func NewNetwork(
	log logging.Logger,
	sender common.AppSender,
	registerer prometheus.Registerer,
	namespace string,
	connectionHandlers ...ConnectionHandler,
) (*Network, error) {

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@JonathanOppenheimer JonathanOppenheimer changed the title Revert "Remove UptimeManager#IsConnected" Revert #4333: "Remove UptimeManager#IsConnected" Oct 1, 2025
@StephenButtolph StephenButtolph added this pull request to the merge queue Oct 1, 2025
Merged via the queue into master with commit 7cb4e13 Oct 1, 2025
35 checks passed
@StephenButtolph StephenButtolph deleted the revert-4333-joshua-kim/remove-is-connected branch October 1, 2025 18:11
@github-project-automation github-project-automation bot moved this to Done 🎉 in avalanchego Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants