|
17 | 17 | solana_signer::Signer, |
18 | 18 | solana_stake_interface as stake, |
19 | 19 | solana_transaction::Transaction, |
20 | | - solana_vote_program::{self as vote_program, vote_state::VoteStateV3}, |
| 20 | + solana_vote_program::{self as vote_program, vote_state::VoteStateV4}, |
21 | 21 | spl_associated_token_account_interface::instruction::create_associated_token_account, |
22 | 22 | spl_single_pool::{ |
23 | 23 | self, find_pool_address, find_pool_mint_address, find_pool_onramp_address, |
@@ -118,7 +118,7 @@ async fn command_initialize(config: &Config, command_config: InitializeCli) -> C |
118 | 118 | match get_initialized_account(config, vote_account_address).await? { |
119 | 119 | Some(vote_account) |
120 | 120 | if vote_account.owner == vote_program::id() |
121 | | - && VoteStateV3::deserialize(&vote_account.data).is_ok() => {} |
| 121 | + && VoteStateV4::deserialize(&vote_account.data, &vote_account_address).is_ok() => {} |
122 | 122 | _ => return Err(format!("{} is not a valid vote account", vote_account_address).into()), |
123 | 123 | } |
124 | 124 |
|
@@ -646,7 +646,8 @@ async fn command_update_metadata( |
646 | 646 | .get_account(vote_account_address) |
647 | 647 | .await? |
648 | 648 | { |
649 | | - let vote_account = VoteStateV3::deserialize(&vote_account_data.data)?; |
| 649 | + let vote_account = |
| 650 | + VoteStateV4::deserialize(&vote_account_data.data, &vote_account_address)?; |
650 | 651 |
|
651 | 652 | if authorized_withdrawer.pubkey() != vote_account.authorized_withdrawer { |
652 | 653 | return Err(format!( |
|
0 commit comments