-
Notifications
You must be signed in to change notification settings - Fork 2.6k
rpc servers CLI: add --max--subscriptions--per--connection
+ fix a few bugs
#11461
Changes from 2 commits
8392760
e97a8a6
f39e142
cb7ecda
dfb6be8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -369,6 +369,11 @@ pub trait CliConfiguration<DCV: DefaultConfigurationValues = ()>: Sized { | |
Ok(None) | ||
} | ||
|
||
/// Get maximum number of subscriptions per connection. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's a default imp for that |
||
fn rpc_max_subscriptions_per_connection(&self) -> Result<Option<usize>> { | ||
Ok(None) | ||
} | ||
|
||
/// Get maximum WS output buffer capacity. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be marked as deprecated maybe? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
fn ws_max_out_buffer_capacity(&self) -> Result<Option<usize>> { | ||
Ok(None) | ||
|
@@ -539,7 +544,7 @@ pub trait CliConfiguration<DCV: DefaultConfigurationValues = ()>: Sized { | |
rpc_max_request_size: self.rpc_max_request_size()?, | ||
rpc_max_response_size: self.rpc_max_response_size()?, | ||
rpc_id_provider: None, | ||
rpc_max_subs_per_conn: None, | ||
rpc_max_subs_per_conn: self.rpc_max_subscriptions_per_connection()?, | ||
ws_max_out_buffer_capacity: self.ws_max_out_buffer_capacity()?, | ||
prometheus_config: self | ||
.prometheus_config(DCV::prometheus_listen_port(), &chain_spec)?, | ||
|
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.
Add a deprecation
eprintln!
here too? And/or docs?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.
https://github.com/paritytech/substrate/blob/8392760e00162cd01d95e4534a1996963b3d8e92/client/service/src/lib.rs#L482-#L526
Added it ☝️ here because it's annoying to print if one doesn't has applied that
CLI option