Cleanup - vote_withdraw_authority_may_change_authorized_voter (#31758)

vote_withdraw_authority_may_change_authorized_voter
This commit is contained in:
Alexander Meißner 2023-05-23 18:20:29 +02:00 committed by GitHub
parent 996ddf602b
commit 28738c3730
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 15 deletions

View File

@ -1066,14 +1066,6 @@ mod tests {
instruction_accounts.clone(),
Ok(()),
);
// should fail, if vote_withdraw_authority_may_change_authorized_voter is disabled
process_instruction_disabled_features(
&instruction_data,
transaction_accounts,
instruction_accounts,
Err(InstructionError::MissingRequiredSignature),
);
}
#[test]

View File

@ -801,13 +801,8 @@ pub fn authorize<S: std::hash::BuildHasher>(
match vote_authorize {
VoteAuthorize::Voter => {
let authorized_withdrawer_signer = if feature_set
.is_active(&feature_set::vote_withdraw_authority_may_change_authorized_voter::id())
{
verify_authorized_signer(&vote_state.authorized_withdrawer, signers).is_ok()
} else {
false
};
let authorized_withdrawer_signer =
verify_authorized_signer(&vote_state.authorized_withdrawer, signers).is_ok();
vote_state.set_new_authorized_voter(
authorized,