Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Fix active vote account close error #26250

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

jstarry
Copy link
Contributor

@jstarry jstarry commented Jun 27, 2022

Problem

The ActiveVoteAccountClose error was added to InstructionError and ProgramError instead of VoteError

Summary of Changes

Fix the error

Fixes #
Feature Gate Issue: #24488

@jstarry jstarry added the v1.10 label Jun 27, 2022
@jstarry jstarry requested a review from willhickey June 27, 2022 15:21
@willhickey
Copy link
Contributor

This leaves ProgramError::ActiveVoteAccountClose and InstructionError::ActiveVoteAccountClose unused. Should we clean those up or do we deliberately leave them for backwards compatibility?

@jstarry
Copy link
Contributor Author

jstarry commented Jun 28, 2022

I'd like to leave them and repurpose them for another error I will be adding soon

Copy link
Contributor

@willhickey willhickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah that makes sense. Looks good to me!

@jstarry jstarry merged commit fa77cc5 into solana-labs:master Jun 28, 2022
@jstarry jstarry deleted the fix/active-vote-err branch June 28, 2022 19:35
mergify bot pushed a commit that referenced this pull request Jun 28, 2022
mergify bot added a commit that referenced this pull request Jun 28, 2022
(cherry picked from commit fa77cc5)

Co-authored-by: Justin Starry <[email protected]>
@jstarry jstarry added the feature-gate Pull Request adds or modifies a runtime feature gate label Jun 29, 2022
@jstarry jstarry added the v1.9 label Jul 6, 2022
mergify bot pushed a commit that referenced this pull request Jul 6, 2022
(cherry picked from commit fa77cc5)

# Conflicts:
#	programs/vote/src/vote_error.rs
#	programs/vote/src/vote_processor.rs
@@ -1336,7 +1336,7 @@ pub fn withdraw<S: std::hash::BuildHasher>(

if reject_active_vote_account_close {
datapoint_debug!("vote-account-close", ("reject-active", 1, i64));
return Err(InstructionError::ActiveVoteAccountClose);
return Err(VoteError::ActiveVoteAccountClose.into());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why am I labeled a bug. If I'm a bug why is everyone trying to obtain my files. I've done nothing wrong havn't hacked into nobody shit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-gate Pull Request adds or modifies a runtime feature gate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants