Don't accept incoming connections for collators (#2644)

* Don't accept incoming connections for collators

on the `Collation` peer set.

* Better docs.
This commit is contained in:
Robert Klotzner
2021-03-19 08:20:38 +01:00
committed by GitHub
parent 15ae5dd410
commit 59640a38bc
3 changed files with 31 additions and 7 deletions
+9 -1
View File
@@ -709,7 +709,15 @@ pub fn new_full<RuntimeApi, Executor>(
// Substrate nodes.
config.network.extra_sets.push(grandpa::grandpa_peers_set_config());
#[cfg(feature = "real-overseer")]
config.network.extra_sets.extend(polkadot_network_bridge::peer_sets_info());
{
use polkadot_network_bridge::{peer_sets_info, IsAuthority};
let is_authority = if role.is_authority() {
IsAuthority::Yes
} else {
IsAuthority::No
};
config.network.extra_sets.extend(peer_sets_info(is_authority));
}
// Add a dummy collation set with the intent of printing an error if one tries to connect a
// collator to a node that isn't compiled with `--features real-overseer`.