@@ -2970,7 +2970,16 @@ impl ReplayStage {
29702970 }
29712971 Some ( vote_account) => vote_account,
29722972 } ;
2973- let vote_state = vote_account. vote_state_view ( ) ;
2973+ let vote_state = match vote_account. alpenglow_vote_state ( ) {
2974+ None => {
2975+ warn ! (
2976+ "Vote account {} does not have an Alpenglow vote state. Unable to vote" ,
2977+ vote_account_pubkey,
2978+ ) ;
2979+ return GenerateVoteTxResult :: Failed ;
2980+ }
2981+ Some ( vote_state) => vote_state,
2982+ } ;
29742983 if * vote_state. node_pubkey ( ) != node_keypair. pubkey ( ) {
29752984 info ! (
29762985 "Vote account node_pubkey mismatch: {} (expected: {}). Unable to vote" ,
@@ -2991,7 +3000,7 @@ impl ReplayStage {
29913000
29923001 let authorized_voter_keypair = match authorized_voter_keypairs
29933002 . iter ( )
2994- . find ( |keypair| keypair. pubkey ( ) == * authorized_voter_pubkey)
3003+ . find ( |keypair| keypair. pubkey ( ) == authorized_voter_pubkey)
29953004 {
29963005 None => {
29973006 warn ! (
@@ -3058,7 +3067,16 @@ impl ReplayStage {
30583067 }
30593068 Some ( vote_account) => vote_account,
30603069 } ;
3061- let vote_state_view = vote_account. vote_state_view ( ) ;
3070+ let vote_state_view = match vote_account. vote_state_view ( ) {
3071+ None => {
3072+ warn ! (
3073+ "Vote account {} does not have a vote state. Unable to vote" ,
3074+ vote_account_pubkey,
3075+ ) ;
3076+ return GenerateVoteTxResult :: Failed ;
3077+ }
3078+ Some ( vote_state_view) => vote_state_view,
3079+ } ;
30623080 if vote_state_view. node_pubkey ( ) != & node_keypair. pubkey ( ) {
30633081 info ! (
30643082 "Vote account node_pubkey mismatch: {} (expected: {}). Unable to vote" ,
@@ -4289,7 +4307,10 @@ impl ReplayStage {
42894307 let Some ( vote_account) = bank. get_vote_account ( my_vote_pubkey) else {
42904308 return ;
42914309 } ;
4292- let mut bank_vote_state = TowerVoteState :: from ( vote_account. vote_state_view ( ) ) ;
4310+ let Some ( vote_state_view) = vote_account. vote_state_view ( ) else {
4311+ return ;
4312+ } ;
4313+ let mut bank_vote_state = TowerVoteState :: from ( vote_state_view) ;
42934314 if bank_vote_state. last_voted_slot ( ) <= tower. vote_state . last_voted_slot ( ) {
42944315 return ;
42954316 }
@@ -8719,6 +8740,7 @@ pub(crate) mod tests {
87198740 assert_eq ! (
87208741 vote_account
87218742 . vote_state_view( )
8743+ . unwrap( )
87228744 . votes_iter( )
87238745 . map( |lockout| lockout. slot( ) )
87248746 . collect_vec( ) ,
@@ -10417,4 +10439,4 @@ pub(crate) mod tests {
1041710439 & mut PurgeRepairSlotCounter :: default ( ) ,
1041810440 ) ;
1041910441 }
10420- }
10442+ }
0 commit comments