mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 22:47:56 +00:00
Cleanup light client leftovers (#11865)
* Remove --light cli option * Cleanup light client leftovers * Remove commented-out code and clean-up more light client leftovers * Fix formatting with `cargo +nightly fmt` * Remove FIXME regarding db directory structure Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -147,8 +147,6 @@ where
|
||||
pub enum Role {
|
||||
/// Regular full node.
|
||||
Full,
|
||||
/// Regular light node.
|
||||
Light,
|
||||
/// Actual authority.
|
||||
Authority,
|
||||
}
|
||||
@@ -158,18 +156,12 @@ impl Role {
|
||||
pub fn is_authority(&self) -> bool {
|
||||
matches!(self, Self::Authority { .. })
|
||||
}
|
||||
|
||||
/// True for [`Role::Light`].
|
||||
pub fn is_light(&self) -> bool {
|
||||
matches!(self, Self::Light { .. })
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Role {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
Self::Full => write!(f, "FULL"),
|
||||
Self::Light => write!(f, "LIGHT"),
|
||||
Self::Authority { .. } => write!(f, "AUTHORITY"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user