Skip to content

Commit

Permalink
fix: node type bit
Browse files Browse the repository at this point in the history
Signed-off-by: Zander Franks <[email protected]>
  • Loading branch information
voximity committed May 17, 2024
1 parent 1f01c0b commit 356d293
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/snops-common/src/state/node_type.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::ffi::OsStr;

use crate::format::DataFormat;
use crate::{format::DataFormat, prelude::MaskBit};

#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "lowercase")]
Expand Down Expand Up @@ -36,7 +36,11 @@ impl NodeType {
}

pub fn bit(self) -> usize {
self as usize
(match self {
Self::Validator => MaskBit::Validator,
Self::Prover => MaskBit::Prover,
Self::Client => MaskBit::Client,
}) as usize
}
}

Expand Down

0 comments on commit 356d293

Please sign in to comment.