mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 22:47:56 +00:00
Remove all code related to sentry nodes (#8079)
* Remove all code related to sentry nodes * More fixing
This commit is contained in:
@@ -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"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user