pub fn check_version(data: &[u8], min_version: u8) -> ProgramResultExpand description
Verify the header version byte (data[1]) meets a minimum version.
Standalone version of the check inside check_header. Use this when
you’ve already validated the discriminator separately and just need
the version gate.
ⓘ
let data = account.try_borrow()?;
check_version(&data, 2)?; // requires version >= 2