mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 14:17:56 +00:00
Add a warning if users pass --sentry or --sentry-nodes (#6779)
* Add a warning if users pass --sentry or --sentry-nodes * Apply suggestions from code review Co-authored-by: Max Inden <mail@max-inden.de> * Fix text Co-authored-by: parity-processbot <> Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
@@ -180,6 +180,21 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkWorker<B, H> {
|
||||
known_addresses.push((reserved.peer_id.clone(), reserved.multiaddr.clone()));
|
||||
}
|
||||
|
||||
let print_deprecated_message = match ¶ms.role {
|
||||
Role::Sentry { .. } => true,
|
||||
Role::Authority { sentry_nodes } if !sentry_nodes.is_empty() => true,
|
||||
_ => false,
|
||||
};
|
||||
if print_deprecated_message {
|
||||
log::warn!(
|
||||
"🙇 Sentry nodes are deprecated, and the `--sentry` and `--sentry-nodes` \
|
||||
CLI options will eventually be removed in a future version. The Substrate \
|
||||
and Polkadot networking protocol require validators to be \
|
||||
publicly-accessible. Please do not block access to your validator nodes. \
|
||||
For details, see https://github.com/paritytech/substrate/issues/6845."
|
||||
);
|
||||
}
|
||||
|
||||
let mut sentries_and_validators = HashSet::new();
|
||||
match ¶ms.role {
|
||||
Role::Sentry { validators } => {
|
||||
|
||||
Reference in New Issue
Block a user