light_registry/epoch/
finalize_registration.rs

1use anchor_lang::prelude::*;
2
3use crate::{EpochPda, ForesterEpochPda};
4
5#[derive(Accounts)]
6pub struct FinalizeRegistration<'info> {
7    pub authority: Signer<'info>,
8    #[account(mut,has_one = authority)]
9    pub forester_epoch_pda: Account<'info, ForesterEpochPda>,
10    /// CHECK: instruction checks that the epoch is the current epoch.
11    #[account(constraint = epoch_pda.epoch == forester_epoch_pda.epoch)]
12    pub epoch_pda: Account<'info, EpochPda>,
13}