From 4d66db69dcfb9d073402a2a73ed624eb003aff11 Mon Sep 17 00:00:00 2001 From: Hardhat Chad Date: Tue, 24 Sep 2024 05:56:19 +0000 Subject: [PATCH] var name --- program/src/mine.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/program/src/mine.rs b/program/src/mine.rs index 488a09b..2d3aba2 100644 --- a/program/src/mine.rs +++ b/program/src/mine.rs @@ -139,7 +139,7 @@ pub fn process_mine(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult // Boosts are incentives that can multiply a miner's rewards by staking tokens in the ORE Boosts program. // Up to 3 boosts can be applied on any given mine operation. log::sol_log(&format!("Base: {}", reward)); - let mut boosts = [Pubkey::new_from_array([0; 32]); 3]; + let mut applied_boosts = [Pubkey::new_from_array([0; 32]); 3]; for i in 0..3 { if optional_accounts.len().gt(&(i * 2)) { // Load optional accounts. @@ -149,12 +149,12 @@ pub fn process_mine(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult load_stake(&stake_info, &proof.authority, boost_info.key, false)?; // Skip if boost is applied twice. - if boosts.contains(boost_info.key) { + if applied_boosts.contains(boost_info.key) { continue; } // Record this boost has been used. - boosts[i] = *boost_info.key; + applied_boosts[i] = *boost_info.key; // Parse account data. let boost_data = boost_info.data.borrow();