ckb_shared/block_status.rs
1//! Provide BlockStatus
2#![allow(missing_docs)]
3#![allow(clippy::bad_bit_mask)]
4
5use bitflags::bitflags;
6bitflags! {
7 pub struct BlockStatus: u32 {
8 const UNKNOWN = 0;
9
10 const HEADER_VALID = 1;
11 const BLOCK_RECEIVED = 1 | (Self::HEADER_VALID.bits << 1);
12 const BLOCK_STORED = 1 | (Self::BLOCK_RECEIVED.bits << 1);
13 const BLOCK_VALID = 1 | (Self::BLOCK_STORED.bits << 1);
14
15 const BLOCK_INVALID = 1 << 12;
16 }
17}