vote: Add helper for creating current-versioned states

This commit is contained in:
Trent Nelson
2020-12-21 16:19:04 -07:00
committed by Trent Nelson
parent 3881ae10fb
commit 5b903318b2
13 changed files with 37 additions and 33 deletions

View File

@@ -3217,7 +3217,7 @@ pub mod tests {
vote_state.root_slot = Some(root);
let mut vote_account =
Account::new(1, VoteState::size_of(), &solana_vote_program::id());
let versioned = VoteStateVersions::Current(Box::new(vote_state));
let versioned = VoteStateVersions::new_current(vote_state);
VoteState::serialize(&versioned, &mut vote_account.data).unwrap();
(
solana_sdk::pubkey::new_rand(),