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

Network:: get_status should return NetworkStatus #996

Closed
mattsse opened this issue Jan 23, 2023 · 1 comment · Fixed by #997
Closed

Network:: get_status should return NetworkStatus #996

mattsse opened this issue Jan 23, 2023 · 1 comment · Fixed by #997
Assignees
Labels
A-networking Related to networking in general C-debt Refactor of code section that is hard to understand or maintain

Comments

@mattsse
Copy link
Collaborator

mattsse commented Jan 23, 2023

Rn Network:: get_status returns Status:

/// Get the current status of the node.
pub async fn get_status(&self) -> Result<Status, oneshot::error::RecvError> {
let (tx, rx) = oneshot::channel();
let _ = self.manager().send(NetworkHandleMessage::GetStatus(tx));
rx.await
}

but should return NetworkStatus directly

This refactor will make fn get_status obsolete, everything should be moved to fn network_status

cc @leruaa

@mattsse mattsse added C-debt Refactor of code section that is hard to understand or maintain A-networking Related to networking in general labels Jan 23, 2023
@leruaa
Copy link
Contributor

leruaa commented Jan 23, 2023

I'm on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-networking Related to networking in general C-debt Refactor of code section that is hard to understand or maintain
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants