mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +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:
@@ -223,8 +223,14 @@ async fn forward_collator_events(
|
||||
f = finality.next() => {
|
||||
match f {
|
||||
Some(header) => {
|
||||
tracing::info!(target: "minimal-polkadot-node", "Received finalized block via RPC: #{} ({})", header.number, header.hash());
|
||||
let block_info = BlockInfo { hash: header.hash(), parent_hash: header.parent_hash, number: header.number };
|
||||
tracing::info!(
|
||||
target: "minimal-polkadot-node",
|
||||
"Received finalized block via RPC: #{} ({} -> {})",
|
||||
header.number,
|
||||
header.parent_hash,
|
||||
header.hash()
|
||||
);
|
||||
let block_info = BlockInfo { hash: header.hash(), parent_hash: header.parent_hash, number: header.number };
|
||||
handle.block_finalized(block_info).await;
|
||||
}
|
||||
None => return Err(RelayChainError::GenericError("Relay chain finality stream ended.".to_string())),
|
||||
@@ -233,8 +239,14 @@ async fn forward_collator_events(
|
||||
i = imports.next() => {
|
||||
match i {
|
||||
Some(header) => {
|
||||
tracing::info!(target: "minimal-polkadot-node", "Received imported block via RPC: #{} ({})", header.number, header.hash());
|
||||
let block_info = BlockInfo { hash: header.hash(), parent_hash: header.parent_hash, number: header.number };
|
||||
tracing::info!(
|
||||
target: "minimal-polkadot-node",
|
||||
"Received imported block via RPC: #{} ({} -> {})",
|
||||
header.number,
|
||||
header.parent_hash,
|
||||
header.hash()
|
||||
);
|
||||
let block_info = BlockInfo { hash: header.hash(), parent_hash: header.parent_hash, number: header.number };
|
||||
handle.block_imported(block_info).await;
|
||||
}
|
||||
None => return Err(RelayChainError::GenericError("Relay chain import stream ended.".to_string())),
|
||||
|
||||
Reference in New Issue
Block a user