pub(crate) fn bytes_to_store(&self) -> &[u8] {
        match self.shred_type() {
            ShredType::Code => &self.payload,
            ShredType::Data => {
                // Payload will be padded out to SHRED_PAYLOAD_SIZE.
                // But only need to store the bytes within data_header.size.
                &self.payload[..self.data_header.size as usize]
            }
        }
    }
// Possibly trimmed payload;
// Should only be used when storing shreds to blockstore.
Possibly trimmed payload;
Should only be used when storing shreds to blockstore.
Possibly trimmed payload ; Should only be used when storing shreds to blockstore .
pub(crate) fn bytes_to_store(&self) -> &[u8] {
        match self.shred_type() {
            ShredType::Code => &self.payload,
            ShredType::Data => {
                // Payload will be padded out to SHRED_PAYLOAD_SIZE.
                // But only need to store the bytes within data_header.size.
                &self.payload[..self.data_header.size as usize]
            }
        }
    }
pub ( crate ) fn bytes_to_store ( & self ) -> & [ u8 ] { match self . shred_type ( ) { ShredType :: Code => & self . payload , ShredType :: Data => { // Payload will be padded out to SHRED_PAYLOAD_SIZE. // But only need to store the bytes within data_header.size. & self . payload [ .. self . data_header . size as usize ] } } }
Possibly trimmed payload;
Should only be used when storing shreds to blockstore.
Possibly trimmed payload ; Should only be used when storing shreds to blockstore .
&self
&self