From 44429c848ec496f726dcf123d66924d73cb711d6 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Fri, 10 Nov 2023 12:12:32 +0000 Subject: [PATCH] Comment --- staking/programs/staking/src/lib.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/staking/programs/staking/src/lib.rs b/staking/programs/staking/src/lib.rs index bddf84e7..15b09757 100644 --- a/staking/programs/staking/src/lib.rs +++ b/staking/programs/staking/src/lib.rs @@ -593,14 +593,12 @@ pub mod staking { let new_voter_record = &mut ctx.accounts.new_voter_record; new_voter_record.initialize(config, &split_request.recipient); - // Split off source account - let source_stake_account_positions = - &mut ctx.accounts.source_stake_account_positions.load_mut()?; - // Pre-check invariants // Note that the accept operation requires the positions account to be empty, which should trivially // pass this invariant check. However, we explicitly check invariants everywhere else, so may // as well check in this operation also. + let source_stake_account_positions = + &mut ctx.accounts.source_stake_account_positions.load_mut()?; utils::risk::validate( source_stake_account_positions, ctx.accounts.source_stake_account_custody.amount,