Skip to content

connect grandpa rpc - #302

Merged
open-junius merged 3 commits into
developmentfrom
junius/connect-grandpa-rpc
Apr 9, 2024
Merged

connect grandpa rpc#302
open-junius merged 3 commits into
developmentfrom
junius/connect-grandpa-rpc

Conversation

@open-junius

Copy link
Copy Markdown
Contributor

The pr is from MacieRaj, rebased with development branch.

@open-junius open-junius self-assigned this Apr 9, 2024
@open-junius

Copy link
Copy Markdown
Contributor Author

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

Comment thread node/src/service.rs
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
Copy Markdown
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
Copy Markdown
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
@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.

3 participants