@@ -2975,7 +2975,16 @@ impl ReplayStage {
29752975 }
29762976 Some ( vote_account) => vote_account,
29772977 } ;
2978- let vote_state = vote_account. vote_state_view ( ) ;
2978+ let vote_state = match vote_account. alpenglow_vote_state ( ) {
2979+ None => {
2980+ warn ! (
2981+ "Vote account {} does not have an Alpenglow vote state. Unable to vote" ,
2982+ vote_account_pubkey,
2983+ ) ;
2984+ return GenerateVoteTxResult :: Failed ;
2985+ }
2986+ Some ( vote_state) => vote_state,
2987+ } ;
29792988 if * vote_state. node_pubkey ( ) != node_keypair. pubkey ( ) {
29802989 info ! (
29812990 "Vote account node_pubkey mismatch: {} (expected: {}). Unable to vote" ,
@@ -2996,7 +3005,7 @@ impl ReplayStage {
29963005
29973006 let authorized_voter_keypair = match authorized_voter_keypairs
29983007 . iter ( )
2999- . find ( |keypair| keypair. pubkey ( ) == * authorized_voter_pubkey)
3008+ . find ( |keypair| keypair. pubkey ( ) == authorized_voter_pubkey)
30003009 {
30013010 None => {
30023011 warn ! (
@@ -3063,7 +3072,16 @@ impl ReplayStage {
30633072 }
30643073 Some ( vote_account) => vote_account,
30653074 } ;
3066- let vote_state_view = vote_account. vote_state_view ( ) ;
3075+ let vote_state_view = match vote_account. vote_state_view ( ) {
3076+ None => {
3077+ warn ! (
3078+ "Vote account {} does not have a vote state. Unable to vote" ,
3079+ vote_account_pubkey,
3080+ ) ;
3081+ return GenerateVoteTxResult :: Failed ;
3082+ }
3083+ Some ( vote_state_view) => vote_state_view,
3084+ } ;
30673085 if vote_state_view. node_pubkey ( ) != & node_keypair. pubkey ( ) {
30683086 info ! (
30693087 "Vote account node_pubkey mismatch: {} (expected: {}). Unable to vote" ,
@@ -4304,7 +4322,10 @@ impl ReplayStage {
43044322 let Some ( vote_account) = bank. get_vote_account ( my_vote_pubkey) else {
43054323 return ;
43064324 } ;
4307- let mut bank_vote_state = TowerVoteState :: from ( vote_account. vote_state_view ( ) ) ;
4325+ let Some ( vote_state_view) = vote_account. vote_state_view ( ) else {
4326+ return ;
4327+ } ;
4328+ let mut bank_vote_state = TowerVoteState :: from ( vote_state_view) ;
43084329 if bank_vote_state. last_voted_slot ( ) <= tower. vote_state . last_voted_slot ( ) {
43094330 return ;
43104331 }
@@ -8710,6 +8731,7 @@ pub(crate) mod tests {
87108731 assert_eq ! (
87118732 vote_account
87128733 . vote_state_view( )
8734+ . unwrap( )
87138735 . votes_iter( )
87148736 . map( |lockout| lockout. slot( ) )
87158737 . collect_vec( ) ,
0 commit comments