@@ -622,37 +622,18 @@ impl Tower {
622
622
// here that this is our leader bank.
623
623
Hash :: default ( )
624
624
} ) ;
625
- self . record_bank_vote_and_update_lockouts (
626
- bank. slot ( ) ,
627
- bank. hash ( ) ,
628
- bank. feature_set
629
- . is_active ( & solana_feature_set:: enable_tower_sync_ix:: id ( ) ) ,
630
- block_id,
631
- )
625
+ self . record_bank_vote_and_update_lockouts ( bank. slot ( ) , bank. hash ( ) , block_id)
632
626
}
633
627
634
628
/// If we've recently updated the vote state by applying a new vote
635
629
/// or syncing from a bank, generate the proper last_vote.
636
- pub ( crate ) fn update_last_vote_from_vote_state (
637
- & mut self ,
638
- vote_hash : Hash ,
639
- enable_tower_sync_ix : bool ,
640
- block_id : Hash ,
641
- ) {
642
- let mut new_vote = if enable_tower_sync_ix {
643
- VoteTransaction :: from ( TowerSync :: new (
644
- self . vote_state . votes . clone ( ) ,
645
- self . vote_state . root_slot ,
646
- vote_hash,
647
- block_id,
648
- ) )
649
- } else {
650
- VoteTransaction :: from ( VoteStateUpdate :: new (
651
- self . vote_state . votes . clone ( ) ,
652
- self . vote_state . root_slot ,
653
- vote_hash,
654
- ) )
655
- } ;
630
+ pub ( crate ) fn update_last_vote_from_vote_state ( & mut self , vote_hash : Hash , block_id : Hash ) {
631
+ let mut new_vote = VoteTransaction :: from ( TowerSync :: new (
632
+ self . vote_state . votes . clone ( ) ,
633
+ self . vote_state . root_slot ,
634
+ vote_hash,
635
+ block_id,
636
+ ) ) ;
656
637
657
638
new_vote. set_timestamp ( self . maybe_timestamp ( self . last_voted_slot ( ) . unwrap_or_default ( ) ) ) ;
658
639
self . last_vote = new_vote;
@@ -662,7 +643,6 @@ impl Tower {
662
643
& mut self ,
663
644
vote_slot : Slot ,
664
645
vote_hash : Hash ,
665
- enable_tower_sync_ix : bool ,
666
646
block_id : Hash ,
667
647
) -> Option < Slot > {
668
648
if let Some ( last_voted_slot) = self . vote_state . last_voted_slot ( ) {
@@ -680,7 +660,7 @@ impl Tower {
680
660
let old_root = self . root ( ) ;
681
661
682
662
self . vote_state . process_next_vote_slot ( vote_slot) ;
683
- self . update_last_vote_from_vote_state ( vote_hash, enable_tower_sync_ix , block_id) ;
663
+ self . update_last_vote_from_vote_state ( vote_hash, block_id) ;
684
664
685
665
let new_root = self . root ( ) ;
686
666
0 commit comments