Skip to main content

read_tail_len

Function read_tail_len 

Source
pub fn read_tail_len(data: &[u8], body_end: usize) -> Result<u32, ProgramError>
Expand description

Read the tail’s u32-LE length prefix.

body_end is the byte offset immediately after the layout’s fixed body (i.e. TYPE_OFFSET + WIRE_SIZE for a layout with no header beyond the 16-byte Hopper prefix, otherwise HEADER_LEN + WIRE_SIZE). Returns AccountDataTooSmall if the account has fewer than 4 tail bytes available.