diff --git a/sdk/program/src/vote/instruction.rs b/sdk/program/src/vote/instruction.rs index c4369dd26d8080..a250048feab657 100644 --- a/sdk/program/src/vote/instruction.rs +++ b/sdk/program/src/vote/instruction.rs @@ -277,8 +277,24 @@ pub fn create_account_with_config( lamports: u64, config: CreateVoteAccountConfig, ) -> Vec { - let create_ix = - system_instruction::create_account(from_pubkey, vote_pubkey, lamports, config.space, &id()); + let create_ix = match config.with_seed { + Some((base, seed)) => system_instruction::create_account_with_seed( + from_pubkey, + vote_pubkey, + base, + seed, + lamports, + config.space, + &id(), + ), + None => system_instruction::create_account( + from_pubkey, + vote_pubkey, + lamports, + config.space, + &id(), + ), + }; let init_ix = initialize_account(vote_pubkey, vote_init); vec![create_ix, init_ix] }