-
Notifications
You must be signed in to change notification settings - Fork 349
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
window svc channels struct #4977
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one nit, lemme know what you think.
It could also be nice to attach some comments to each channel, but I'd be happy to merge this without; don't want to punish a good deed as this is good cleanup as-is
core/src/repair/repair_service.rs
Outdated
@@ -433,12 +466,9 @@ impl RepairService { | |||
&blockstore, | |||
&exit, | |||
&repair_socket, | |||
&repair_request_quic_sender, | |||
&repair_service_channels.repair_channels, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: It looks like the caller takes an owned RepairServiceChannels
.
- For
Self::run()
, we are passing a reference - For
AncestorHashesService::new()
, we are passing the owned channels
For the sake of "symmetry", I think it'd be nice for these to match. I think you could pass owned here as well, since Rust can de-structure the struct implicitly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, symmetry good 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Problem
We pass around a ton of channels from TVU --> Window Service --> Repair & Ancestor Hashes. It makes the code hard to read and also exceeds the recommended params per function in several spots.
Additionally, this will make it easier to add some sub-structs to repair service to make it more digestible (next on my list).
Summary of Changes
No behavioral change expected. Three main things were done:
#[allow(clippy::too_many_arguments)]