Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Add a warning if users pass --sentry or --sentry-nodes #6779

Merged
5 commits merged into from
Aug 12, 2020
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions client/network/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,20 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkWorker<B, H> {
known_addresses.push((reserved.peer_id.clone(), reserved.multiaddr.clone()));
}

let print_deprecated_message = match &params.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 for the time being, and the `--sentry` and
tomaka marked this conversation as resolved.
Show resolved Hide resolved
`--sentry-nodes` CLI options will be removed in a future version. The Substrate
tomaka marked this conversation as resolved.
Show resolved Hide resolved
and Polkadot networking protocol require validators to be publicly-accessible.
Please do not block access to your validator nodes."
tomaka marked this conversation as resolved.
Show resolved Hide resolved
);
}

let mut sentries_and_validators = HashSet::new();
match &params.role {
Role::Sentry { validators } => {
Expand Down