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

NodeManager should update active connection's connectedTime in the NodeGraph on an interval #641

Open
tegefaulkes opened this issue Dec 4, 2023 · 0 comments
Labels
development Standard development

Comments

@tegefaulkes
Copy link
Contributor

Specification

Currently the connectedTime for an entry in the NodeGraph is whatever was provided when it was first added. Ideally this should reflect the last moment we saw it, not the first moment we connected to it.

To fix this we need to add functionality to the NodeGraph where we do the following.

  1. Wait a configured delay.
  2. Iterate over all active connections in the NodeConnectionManager.
  3. If they have an entry in the NodeGraph then update the connectedTime for each connection.
  4. reschedule the task for the configured delay

This will run as a background task using the TaskManager. I don't like having background tasks running for most tests. So I suggest there should be a way to disable this task for testing.

Additional context

Tasks

  1. add background task in NodeManager to update the connectedTime for all active connections.
  2. Add tests to check this functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Standard development
Development

No branches or pull requests

1 participant