ckb_shared/
block_status.rs1#![allow(missing_docs)]
3#![allow(clippy::bad_bit_mask)]
4
5use bitflags::bitflags;
6bitflags! {
7 #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
8 pub struct BlockStatus: u32 {
9 const UNKNOWN = 0;
10
11 const HEADER_VALID = 1;
12 const BLOCK_RECEIVED = 1 | (Self::HEADER_VALID.bits() << 1);
13 const BLOCK_STORED = 1 | (Self::BLOCK_RECEIVED.bits() << 1);
14 const BLOCK_VALID = 1 | (Self::BLOCK_STORED.bits() << 1);
15
16 const BLOCK_INVALID = 1 << 12;
17 }
18}