companion for #13384 (#2417)

* companion for #13384

* update rpc cli

* fix missed stuff

* update parachain rpc commands

* update polkadot and substrate deps

* update substrate & polkadot

---------

Co-authored-by: parity-processbot <>
Co-authored-by: muharem <ismailov.m.h@gmail.com>
This commit is contained in:
Niklas Adolfsson
2023-05-04 12:40:11 +02:00
committed by GitHub
parent 39aec7c14f
commit cb0f623d6f
7 changed files with 290 additions and 346 deletions
+5 -17
View File
@@ -976,14 +976,10 @@ impl DefaultConfigurationValues for RelayChainCli {
30334
}
fn rpc_ws_listen_port() -> u16 {
fn rpc_listen_port() -> u16 {
9945
}
fn rpc_http_listen_port() -> u16 {
9934
}
fn prometheus_listen_port() -> u16 {
9616
}
@@ -1013,16 +1009,8 @@ impl CliConfiguration<Self> for RelayChainCli {
.or_else(|| self.base_path.clone().map(Into::into)))
}
fn rpc_http(&self, default_listen_port: u16) -> Result<Option<SocketAddr>> {
self.base.base.rpc_http(default_listen_port)
}
fn rpc_ipc(&self) -> Result<Option<String>> {
self.base.base.rpc_ipc()
}
fn rpc_ws(&self, default_listen_port: u16) -> Result<Option<SocketAddr>> {
self.base.base.rpc_ws(default_listen_port)
fn rpc_addr(&self, default_listen_port: u16) -> Result<Option<SocketAddr>> {
self.base.base.rpc_addr(default_listen_port)
}
fn prometheus_config(
@@ -1068,8 +1056,8 @@ impl CliConfiguration<Self> for RelayChainCli {
self.base.base.rpc_methods()
}
fn rpc_ws_max_connections(&self) -> Result<Option<usize>> {
self.base.base.rpc_ws_max_connections()
fn rpc_max_connections(&self) -> Result<u32> {
self.base.base.rpc_max_connections()
}
fn rpc_cors(&self, is_dev: bool) -> Result<Option<Vec<String>>> {
+3 -3
View File
@@ -103,7 +103,7 @@ impl DerefMut for KillChildOnDrop {
}
}
/// Read the WS address from the output.
/// Read the RPC server address from the output.
///
/// This is hack to get the actual bound sockaddr because
/// substrate assigns a random port if the specified port was already bound.
@@ -120,7 +120,7 @@ pub fn find_ws_url_from_output(read: impl Read + Send) -> (String, String) {
data.push_str("\n");
// does the line contain our port (we expect this specific output from substrate).
let sock_addr = match line.split_once("Running JSON-RPC WS server: addr=") {
let sock_addr = match line.split_once("Running JSON-RPC server: addr=") {
None => return None,
Some((_, after)) => after.split_once(",").unwrap().0,
};
@@ -129,7 +129,7 @@ pub fn find_ws_url_from_output(read: impl Read + Send) -> (String, String) {
})
.unwrap_or_else(|| {
eprintln!("Output:\n{}", data);
panic!("We should get a WebSocket address")
panic!("We should get an address")
});
(ws_url, data)