pub fn verify_program_address(
        address: &Pubkey,
        program_id: &Pubkey,
    ) -> Result<u8, ProgramError> {
        match Self::program_address(program_id) {
            (real, seed) if real == *address => Ok(seed),
            _ => Err(StakingError::InvalidSettingsAccount.into()),
        }
    }
/// Verify if an address matches the settings PDA
Verify if an address matches the settings PDA
Verify if an address matches the settings PDA
pub fn verify_program_address(
        address: &Pubkey,
        program_id: &Pubkey,
    ) -> Result<u8, ProgramError> {
        match Self::program_address(program_id) {
            (real, seed) if real == *address => Ok(seed),
            _ => Err(StakingError::InvalidSettingsAccount.into()),
        }
    }
pub fn verify_program_address ( address : & Pubkey , program_id : & Pubkey , ) -> Result < u8 , ProgramError > { match Self :: program_address ( program_id ) { ( real , seed ) if real == * address => Ok ( seed ) , _ => Err ( StakingError :: InvalidSettingsAccount . into ( ) ) , } }
Verify if an address matches the settings PDA
Verify if an address matches the settings PDA
address
&Pubkey
program_id
&Pubkey
address
&Pubkey
program_id
&Pubkey