-
Notifications
You must be signed in to change notification settings - Fork 74
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
Simplifications and clean ups to the runtime_service #2180
Conversation
…imeKnown These two fields are only used in the FinalizedBlockRuntimeKnown state. Moving them here clears an ambiguity.
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.
Automatically approving tomaka's pull requests. This auto-approval will be removed once more maintainers are active.
twiggy diff reportDifference in .wasm size before and after this pull request.
|
stream::BoxStream<'static, Result<executor::CoreVersion, RuntimeError>>, | ||
) { | ||
let mut master_stream = stream::unfold(self.guarded.clone(), |guarded| async move { | ||
let subscribe_all = Self::subscribe_all_inner(&guarded, 16, 32).await; |
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.
magic numbers?
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, I agree it's not great. These functions are only used in order to respond to some JSON-RPC methods, and so we have no choice but to use magic numbers anyway. The question is just where to put these magic numbers.
I think these functions should be moved to the json_rpc_service
. I'll do that in a follow-up PR if you don't mind.
See individual commits.
This attempts at cleaning up the code of the service and making it easier to read and understand.