Skip to content

Commit

Permalink
Simplify handling when stake_redelegate_instruction is not yet active
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Jul 27, 2022
1 parent 45d5236 commit 0154776
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions programs/stake/src/stake_instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,11 @@ pub fn process_instruction(
}
}
Ok(StakeInstruction::Redelegate) => {
let mut me = get_stake_account()?;
if invoke_context
.feature_set
.is_active(&feature_set::stake_redelegate_instruction::id())
{
let mut me = get_stake_account()?;
instruction_context.check_number_of_instruction_accounts(3)?;
let config_account =
instruction_context.try_borrow_instruction_account(transaction_context, 3)?;
Expand All @@ -452,11 +452,6 @@ pub fn process_instruction(
&signers,
)
} else {
if !invoke_context.feature_set.is_active(
&feature_set::add_get_minimum_delegation_instruction_to_stake_program::id(),
) {
let _ = get_stake_account()?;
}
Err(InstructionError::InvalidInstructionData)
}
}
Expand Down

0 comments on commit 0154776

Please sign in to comment.