mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 11:38:01 +00:00
gossip: do not try to connect if we are not validators (#2786)
* gossip: do not issue a connection request if we are not a validator * guide updates * use all relevant authorities when issuing a request * use AuthorityDiscoveryApi instead * update comments to the status quo
This commit is contained in:
@@ -34,6 +34,7 @@ use {
|
||||
polkadot_overseer::{AllSubsystems, BlockInfo, Overseer, OverseerHandler},
|
||||
polkadot_primitives::v1::ParachainHost,
|
||||
sc_authority_discovery::Service as AuthorityDiscoveryService,
|
||||
sp_authority_discovery::AuthorityDiscoveryApi,
|
||||
sp_blockchain::HeaderBackend,
|
||||
sp_trie::PrefixedMemoryDB,
|
||||
sc_client_api::{AuxStore, ExecutorProvider},
|
||||
@@ -429,7 +430,7 @@ fn real_overseer<Spawner, RuntimeClient>(
|
||||
) -> Result<(Overseer<Spawner>, OverseerHandler), Error>
|
||||
where
|
||||
RuntimeClient: 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block> + AuxStore,
|
||||
RuntimeClient::Api: ParachainHost<Block> + BabeApi<Block>,
|
||||
RuntimeClient::Api: ParachainHost<Block> + BabeApi<Block> + AuthorityDiscoveryApi<Block>,
|
||||
Spawner: 'static + SpawnNamed + Clone + Unpin,
|
||||
{
|
||||
Overseer::new(
|
||||
@@ -457,7 +458,7 @@ fn real_overseer<Spawner, RuntimeClient>(
|
||||
) -> Result<(Overseer<Spawner>, OverseerHandler), Error>
|
||||
where
|
||||
RuntimeClient: 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block> + AuxStore,
|
||||
RuntimeClient::Api: ParachainHost<Block> + BabeApi<Block>,
|
||||
RuntimeClient::Api: ParachainHost<Block> + BabeApi<Block> + AuthorityDiscoveryApi<Block>,
|
||||
Spawner: 'static + SpawnNamed + Clone + Unpin,
|
||||
{
|
||||
use polkadot_node_subsystem_util::metrics::Metrics;
|
||||
@@ -561,7 +562,10 @@ where
|
||||
keystore.clone(),
|
||||
Metrics::register(registry)?,
|
||||
)?,
|
||||
gossip_support: GossipSupportSubsystem::new(),
|
||||
gossip_support: GossipSupportSubsystem::new(
|
||||
keystore.clone(),
|
||||
runtime_client.clone(),
|
||||
),
|
||||
};
|
||||
|
||||
Overseer::new(
|
||||
|
||||
Reference in New Issue
Block a user