Skip to content

Commit

Permalink
make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
kstepanovdev committed Oct 10, 2024
1 parent d1ff3a2 commit 0c535c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions programs/rewards/src/entrypoint.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//! Program entrypoint
use crate::{error::MplxRewardsError, instructions::process_instruction};
use solana_program::instruction::get_stack_height;
use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult,
program_error::PrintProgramError, pubkey::Pubkey,
instruction::get_stack_height, program_error::PrintProgramError, pubkey::Pubkey,
};

entrypoint!(program_entrypoint);
Expand Down
5 changes: 3 additions & 2 deletions programs/rewards/src/state/reward_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ impl<'a> WrappedRewardPool<'a> {
Ok(())
}

#[allow(clippy::too_many_arguments)]
pub fn change_delegate(
&mut self,
mining: &mut WrappedMining,
Expand All @@ -179,7 +180,7 @@ impl<'a> WrappedRewardPool<'a> {
let mut old_delegate_mining = WrappedMining::from_bytes_mut(old_delegate_mining_data)?;

assert_pubkey_eq(&old_delegate_mining.mining.owner, old_delegate)?;
assert_account_key(&reward_pool, &old_delegate_mining.mining.reward_pool)?;
assert_account_key(reward_pool, &old_delegate_mining.mining.reward_pool)?;

old_delegate_mining.mining.stake_from_others = old_delegate_mining
.mining
Expand All @@ -198,7 +199,7 @@ impl<'a> WrappedRewardPool<'a> {
let mut new_delegate_mining = WrappedMining::from_bytes_mut(new_delegate_mining_data)?;

assert_pubkey_eq(&new_delegate_mining.mining.owner, new_delegate)?;
assert_account_key(&reward_pool, &new_delegate_mining.mining.reward_pool)?;
assert_account_key(reward_pool, &new_delegate_mining.mining.reward_pool)?;

new_delegate_mining.mining.stake_from_others = new_delegate_mining
.mining
Expand Down

0 comments on commit 0c535c6

Please sign in to comment.