@@ -5630,7 +5630,7 @@ pub(crate) mod tests {
5630
5630
let blockstore = Arc :: new (
5631
5631
Blockstore :: open ( & ledger_path) . expect ( "Expected to be able to open database ledger" ) ,
5632
5632
) ;
5633
- let mut tower = Tower :: new_for_tests ( 8 , 0.67 ) ;
5633
+ let mut tower = Tower :: new_for_tests ( 8 , 2.0 / 3.0 ) ;
5634
5634
5635
5635
// All forks have same weight so heaviest bank to vote/reset on should be the tip of
5636
5636
// the fork with the lower slot
@@ -5651,7 +5651,7 @@ pub(crate) mod tests {
5651
5651
) ;
5652
5652
5653
5653
// 4 should be the heaviest slot, but should not be votable
5654
- // because of lockout. 5 is the heaviest slot on the same fork of the last vote.
5654
+ // because of lockout. 5 is the heaviest slot on the same fork as the last vote.
5655
5655
let ( vote_fork, reset_fork) = run_compute_and_select_forks (
5656
5656
& bank_forks,
5657
5657
& mut progress,
@@ -5660,10 +5660,9 @@ pub(crate) mod tests {
5660
5660
& mut vote_simulator. latest_validator_votes_for_frozen_banks ,
5661
5661
) ;
5662
5662
assert ! ( vote_fork. is_none( ) ) ;
5663
- assert_eq ! ( reset_fork. unwrap ( ) , 5 ) ;
5663
+ assert_eq ! ( reset_fork, Some ( 5 ) ) ;
5664
5664
5665
- // Mark 5 as duplicate, 4 should be the heaviest slot, but should not be votable
5666
- // because of lockout
5665
+ // Mark 5 as duplicate
5667
5666
blockstore. store_duplicate_slot ( 5 , vec ! [ ] , vec ! [ ] ) . unwrap ( ) ;
5668
5667
let mut duplicate_slots_tracker = DuplicateSlotsTracker :: default ( ) ;
5669
5668
let mut gossip_duplicate_confirmed_slots = GossipDuplicateConfirmedSlots :: default ( ) ;
@@ -5734,7 +5733,7 @@ pub(crate) mod tests {
5734
5733
& mut vote_simulator. heaviest_subtree_fork_choice ,
5735
5734
& mut vote_simulator. latest_validator_votes_for_frozen_banks ,
5736
5735
) ;
5737
- // Should now pick 5 the heaviest fork from last vote again.
5736
+ // Should now pick 5 as the heaviest fork from last vote again.
5738
5737
assert ! ( vote_fork. is_none( ) ) ;
5739
5738
assert_eq ! ( reset_fork. unwrap( ) , 5 ) ;
5740
5739
}
0 commit comments