This commit is contained in:
Hardhat Chad
2024-03-07 18:48:01 +00:00
parent cba2c748e2
commit 3af8f31089
20 changed files with 165 additions and 27 deletions

View File

@@ -7,6 +7,12 @@ use crate::{
instruction::UpdateDifficultyArgs, loaders::*, state::Treasury, utils::AccountDeserialize,
};
/// UpdateDifficulty updates the program's global difficulty value. It has 1 responsibility:
/// 1. Update the difficulty.
///
/// Safety requirements:
/// - Can only succeed if the signer is the current program admin.
/// - Can only succeed if the provided treasury is valid.
pub fn process_update_difficulty<'a, 'info>(
_program_id: &Pubkey,
accounts: &'a [AccountInfo<'info>],