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 eacafe1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions programs/stake/src/stake_instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ 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())
Expand All @@ -452,11 +453,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 eacafe1

Please sign in to comment.