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

connect grandpa rpc #302

Merged
merged 3 commits into from
Apr 9, 2024
Merged

connect grandpa rpc #302

merged 3 commits into from
Apr 9, 2024

Conversation

open-junius
Copy link
Contributor

The pr is from MacieRaj, rebased with development branch.

@open-junius open-junius self-assigned this Apr 9, 2024
@open-junius
Copy link
Contributor Author

The PR looks good to me, the grandpa rpc is supported.

Comment on lines +245 to +262
Box::new(move |deny_unsafe, subscription_executor: sc_rpc::SubscriptionTaskExecutor| {
let deps =
crate::rpc::FullDeps {
client: client.clone(),
pool: pool.clone(),
deny_unsafe,
grandpa: crate::rpc::GrandpaDeps {
shared_voter_state: shared_voter_state.clone(),
shared_authority_set: shared_authority_set.clone(),
justification_stream: justification_stream.clone(),
subscription_executor: subscription_executor.clone(),
finality_provider: finality_proof_provider.clone(),
},
backend: rpc_backend.clone(),
};
crate::rpc::create_full(deps).map_err(Into::into)
})
};
Copy link
Contributor

Choose a reason for hiding this comment

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

lot of boxing and cloning here, I wonder if it is actually all necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just checked, all clones are needed. can't fully understand the grammar yet, like need a new variable then box can pin them

@open-junius open-junius merged commit ba16ece into development Apr 9, 2024
6 checks passed
@sam0x17 sam0x17 deleted the junius/connect-grandpa-rpc branch April 9, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants