Fix VoteInstruction order (#27035)

This commit is contained in:
Tyera Eulberg 2022-08-09 14:20:55 -07:00 committed by GitHub
parent b0c61e832c
commit f8d610dbe7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 14 deletions

View File

@ -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.
@ -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 {