From 9e688f899ee57d7e710e72a2d92f47857e05402a Mon Sep 17 00:00:00 2001 From: Hardhat Chad Date: Wed, 12 Feb 2025 11:43:34 -0800 Subject: [PATCH] silence the id validation --- program/src/rebase.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/program/src/rebase.rs b/program/src/rebase.rs index 9ef37e7..2f58218 100644 --- a/program/src/rebase.rs +++ b/program/src/rebase.rs @@ -60,8 +60,12 @@ pub fn process_rebase(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResu // Load stake account. let stake = stake_info .as_account_mut::(&ore_boost_api::ID)? - .assert_mut(|s| s.boost == *boost_info.key)? - .assert_mut(|s| s.id == checkpoint.current_id)?; + .assert_mut(|s| s.boost == *boost_info.key)?; + + // Silently return if the provided stake account is not the expected stake account. + if stake.id != checkpoint.current_id { + return Ok(()); + } // Distribute staker rewards according to stake weight. if checkpoint.current_id < checkpoint.total_stakers && boost.total_deposits > 0 {