pub(crate) fn sanitize(&self) -> bool {
        self.erasure_block_index().is_some()
            && match self.shred_type() {
                ShredType::Data => {
                    self.parent().is_ok()
                        && usize::from(self.data_header.size) <= self.payload.len()
                }
                ShredType::Code => {
                    u32::from(self.coding_header.num_coding_shreds)
                        <= 8 * MAX_DATA_SHREDS_PER_FEC_BLOCK
                }
            }
    }
// Returns true if the shred passes sanity checks.
Returns true if the shred passes sanity checks.
Returns true if the shred passes sanity checks .
pub(crate) fn sanitize(&self) -> bool {
        self.erasure_block_index().is_some()
            && match self.shred_type() {
                ShredType::Data => {
                    self.parent().is_ok()
                        && usize::from(self.data_header.size) <= self.payload.len()
                }
                ShredType::Code => {
                    u32::from(self.coding_header.num_coding_shreds)
                        <= 8 * MAX_DATA_SHREDS_PER_FEC_BLOCK
                }
            }
    }
pub ( crate ) fn sanitize ( & self ) -> bool { self . erasure_block_index ( ) . is_some ( ) && match self . shred_type ( ) { ShredType :: Data => { self . parent ( ) . is_ok ( ) && usize :: from ( self . data_header . size ) <= self . payload . len ( ) } ShredType :: Code => { u32 :: from ( self . coding_header . num_coding_shreds ) <= 8 * MAX_DATA_SHREDS_PER_FEC_BLOCK } } }
Returns true if the shred passes sanity checks.
Returns true if the shred passes sanity checks .
&self