mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-25 15:17:57 +00:00
Allow to specify multiple relay chain RPC urls for collator node (#1880)
* Allow specification of multiple urls for relay chain rpc nodes * Add pooled RPC client basics * Add list of clients to pooled client * Improve * Forward requests to dispatcher * Switch clients on error * Implement rotation logic * Improve subscription handling * Error handling cleanup * Remove retry from rpc-client * Improve naming * Improve documentation * Improve `ClientManager` abstraction * Adjust zombienet test * Add more comments * fmt * Apply reviewers comments * Extract reconnection to extra method * Add comment to reconnection method * Clean up some dependencies * Fix build * fmt * Provide alias for cli argument * Apply review comments * Rename P* to Relay* * Improve zombienet test * fmt * Fix zombienet sleep * Simplify zombienet test * Reduce log clutter and fix starting position * Do not distribute duplicated imported and finalized blocks * fmt * Apply code review suggestions * Move building of relay chain interface to `cumulus-client-service` * Refactoring to not push back into channel * FMT
This commit is contained in:
@@ -293,9 +293,11 @@ pub struct RunCmd {
|
||||
/// EXPERIMENTAL: Specify an URL to a relay chain full node to communicate with.
|
||||
#[arg(
|
||||
long,
|
||||
value_parser = validate_relay_chain_url
|
||||
value_parser = validate_relay_chain_url,
|
||||
num_args = 0..,
|
||||
alias = "relay-chain-rpc-url"
|
||||
)]
|
||||
pub relay_chain_rpc_url: Option<Url>,
|
||||
pub relay_chain_rpc_urls: Vec<Url>,
|
||||
}
|
||||
|
||||
impl RunCmd {
|
||||
@@ -310,7 +312,7 @@ impl RunCmd {
|
||||
|
||||
/// Create [`CollatorOptions`] representing options only relevant to parachain collator nodes
|
||||
pub fn collator_options(&self) -> CollatorOptions {
|
||||
CollatorOptions { relay_chain_rpc_url: self.relay_chain_rpc_url.clone() }
|
||||
CollatorOptions { relay_chain_rpc_urls: self.relay_chain_rpc_urls.clone() }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,7 +320,7 @@ impl RunCmd {
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct CollatorOptions {
|
||||
/// Location of relay chain full node
|
||||
pub relay_chain_rpc_url: Option<Url>,
|
||||
pub relay_chain_rpc_urls: Vec<Url>,
|
||||
}
|
||||
|
||||
/// A non-redundant version of the `RunCmd` that sets the `validator` field when the
|
||||
|
||||
Reference in New Issue
Block a user