Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix VoteInstruction order #27035

Merged
merged 1 commit into from
Aug 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions programs/vote/src/vote_instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,6 @@ pub enum VoteInstruction {
/// 1. `[SIGNER]` Vote authority
UpdateVoteStateSwitch(VoteStateUpdate, Hash),

/// Update the onchain vote state for the signer.
///
/// # Account references
/// 0. `[Write]` Vote account to vote with
/// 1. `[SIGNER]` Vote authority
CompactUpdateVoteState(CompactVoteStateUpdate),

/// Update the onchain vote state for the signer along with a switching proof.
///
/// # Account references
/// 0. `[Write]` Vote account to vote with
/// 1. `[SIGNER]` Vote authority
CompactUpdateVoteStateSwitch(CompactVoteStateUpdate, Hash),

/// Given that the current Voter or Withdrawer authority is a derived key,
/// this instruction allows someone who can sign for that derived key's
/// base key to authorize a new Voter or Withdrawer for a vote account.
Expand All @@ -140,6 +126,20 @@ pub enum VoteInstruction {
/// 2. `[SIGNER]` Base key of current Voter or Withdrawer authority's derived key
/// 3. `[SIGNER]` New vote or withdraw authority
AuthorizeCheckedWithSeed(VoteAuthorizeCheckedWithSeedArgs),

/// Update the onchain vote state for the signer.
///
/// # Account references
/// 0. `[Write]` Vote account to vote with
/// 1. `[SIGNER]` Vote authority
CompactUpdateVoteState(CompactVoteStateUpdate),

/// Update the onchain vote state for the signer along with a switching proof.
///
/// # Account references
/// 0. `[Write]` Vote account to vote with
/// 1. `[SIGNER]` Vote authority
CompactUpdateVoteStateSwitch(CompactVoteStateUpdate, Hash),
}

fn initialize_account(vote_pubkey: &Pubkey, vote_init: &VoteInit) -> Instruction {
Expand Down