(input: &[u8])
| 21 | const LEN: usize = 2; |
| 22 | |
| 23 | fn unpack_from_slice(input: &[u8]) -> Result<Self, ProgramError> { |
| 24 | let input = array_ref![input, 0, NullifierState::LEN]; |
| 25 | |
| 26 | let (is_initialized, _account_type) = array_refs![input, 1, 1]; |
| 27 | |
| 28 | if is_initialized[0] != 0 { |
| 29 | msg!("nullifier already spent"); |
| 30 | panic!(); |
| 31 | } |
| 32 | Ok(NullifierState { |
| 33 | is_initialized: true, |
| 34 | account_type: 3, |
| 35 | }) |
| 36 | } |
| 37 | |
| 38 | fn pack_into_slice(&self, dst: &mut [u8]) { |
| 39 | let dst = array_mut_ref![dst, 0, NullifierState::LEN]; |
nothing calls this directly
no outgoing calls
no test coverage detected