Function nullify_compressed_accounts

Source
pub async fn nullify_compressed_accounts<R: RpcConnection>(
    rpc: &mut R,
    forester: &Keypair,
    state_tree_bundle: &mut StateMerkleTreeBundle,
    epoch: u64,
    is_metadata_forester: bool,
) -> Result<(), RpcError>
Expand description

Check compressed_accounts in the queue array which are not nullified yet Iterate over these compressed_accounts and nullify them

Checks:

  1. Value in hashset is marked
  2. State tree root is updated
  3. TODO: add event is emitted (after rebase) optional: assert that the Merkle tree doesn’t change except the updated leaf