Remove all code related to sentry nodes (#8079)

* Remove all code related to sentry nodes

* More fixing
This commit is contained in:
Pierre Krieger
2021-02-15 09:45:03 +01:00
committed by GitHub
parent 019f04e99f
commit f6273f7914
17 changed files with 22 additions and 128 deletions
+1 -18
View File
@@ -128,18 +128,8 @@ pub enum Role {
Full,
/// Regular light node.
Light,
/// Sentry node that guards an authority. Will be reported as "authority" on the wire protocol.
Sentry {
/// Address and identity of the validator nodes that we're guarding.
///
/// The nodes will be granted some priviledged status.
validators: Vec<MultiaddrWithPeerId>,
},
/// Actual authority.
Authority {
/// List of public addresses and identities of our sentry nodes.
sentry_nodes: Vec<MultiaddrWithPeerId>,
}
Authority,
}
impl Role {
@@ -147,12 +137,6 @@ impl Role {
pub fn is_authority(&self) -> bool {
matches!(self, Role::Authority { .. })
}
/// True for `Role::Authority` and `Role::Sentry` since they're both
/// announced as having the authority role to the network.
pub fn is_network_authority(&self) -> bool {
matches!(self, Role::Authority { .. } | Role::Sentry { .. })
}
}
impl fmt::Display for Role {
@@ -160,7 +144,6 @@ impl fmt::Display for Role {
match self {
Role::Full => write!(f, "FULL"),
Role::Light => write!(f, "LIGHT"),
Role::Sentry { .. } => write!(f, "SENTRY"),
Role::Authority { .. } => write!(f, "AUTHORITY"),
}
}