account_compression/utils/
queue.rs1use std::collections::HashMap;
2
3use anchor_lang::prelude::{AccountInfo, Pubkey};
4
5pub type QueueMap<'info> = HashMap<Pubkey, QueueBundle<'info>>;
11
12pub struct QueueBundle<'info> {
18 pub queue: &'info AccountInfo<'info>,
19 pub merkle_tree: &'info AccountInfo<'info>,
20 pub elements: Vec<[u8; 32]>,
21}
22
23impl<'info> QueueBundle<'info> {
24 pub fn new(queue: &'info AccountInfo<'info>, merkle_tree: &'info AccountInfo<'info>) -> Self {
25 Self {
26 queue,
27 merkle_tree,
28 elements: Vec::new(),
29 }
30 }
31}