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

Introduce RpcParams in sc-cli #5601

Merged
merged 6 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cumulus/client/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl PurgeChainCmd {
Some('y') | Some('Y') => {},
_ => {
println!("Aborted");
return Ok(())
return Ok(());
},
}
}
Expand Down Expand Up @@ -432,19 +432,19 @@ impl sc_cli::CliConfiguration for NormalizedRunCmd {
}

fn rpc_max_request_size(&self) -> sc_cli::Result<u32> {
Ok(self.base.rpc_max_request_size)
self.base.rpc_max_request_size()
}

fn rpc_max_response_size(&self) -> sc_cli::Result<u32> {
Ok(self.base.rpc_max_response_size)
self.base.rpc_max_response_size()
}

fn rpc_max_subscriptions_per_connection(&self) -> sc_cli::Result<u32> {
Ok(self.base.rpc_max_subscriptions_per_connection)
self.base.rpc_max_subscriptions_per_connection()
}

fn rpc_buffer_capacity_per_connection(&self) -> sc_cli::Result<u32> {
Ok(self.base.rpc_message_buffer_capacity_per_connection)
Ok(self.base.rpc_params.rpc_message_buffer_capacity_per_connection)
}

fn rpc_batch_config(&self) -> sc_cli::Result<RpcBatchRequestConfig> {
Expand Down
12 changes: 12 additions & 0 deletions prdoc/pr_5601.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
title: Introduce `RpcParams` in sc-cli

doc:
- audience: Node Dev
description: |
Refactors and consolidates all RPC-related parameters in the run command into a dedicated `RpcParams` struct. This change allows downstream users to build custom run command without duplicating code.

crates:
- name: cumulus-client-cli
bump: none
- name: sc-cli
bump: major
Loading
Loading