Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit c175173

Browse files
committed
feedback
1 parent e3c9748 commit c175173

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

core/src/replay_stage.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5630,7 +5630,7 @@ pub(crate) mod tests {
56305630
let blockstore = Arc::new(
56315631
Blockstore::open(&ledger_path).expect("Expected to be able to open database ledger"),
56325632
);
5633-
let mut tower = Tower::new_for_tests(8, 0.67);
5633+
let mut tower = Tower::new_for_tests(8, 2.0 / 3.0);
56345634

56355635
// All forks have same weight so heaviest bank to vote/reset on should be the tip of
56365636
// the fork with the lower slot
@@ -5651,7 +5651,7 @@ pub(crate) mod tests {
56515651
);
56525652

56535653
// 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.
56555655
let (vote_fork, reset_fork) = run_compute_and_select_forks(
56565656
&bank_forks,
56575657
&mut progress,
@@ -5660,10 +5660,9 @@ pub(crate) mod tests {
56605660
&mut vote_simulator.latest_validator_votes_for_frozen_banks,
56615661
);
56625662
assert!(vote_fork.is_none());
5663-
assert_eq!(reset_fork.unwrap(), 5);
5663+
assert_eq!(reset_fork, Some(5));
56645664

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
56675666
blockstore.store_duplicate_slot(5, vec![], vec![]).unwrap();
56685667
let mut duplicate_slots_tracker = DuplicateSlotsTracker::default();
56695668
let mut gossip_duplicate_confirmed_slots = GossipDuplicateConfirmedSlots::default();
@@ -5734,7 +5733,7 @@ pub(crate) mod tests {
57345733
&mut vote_simulator.heaviest_subtree_fork_choice,
57355734
&mut vote_simulator.latest_validator_votes_for_frozen_banks,
57365735
);
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.
57385737
assert!(vote_fork.is_none());
57395738
assert_eq!(reset_fork.unwrap(), 5);
57405739
}

0 commit comments

Comments
 (0)