Fix typo in comments in core (#34594)

This commit is contained in:
Ford 2023-12-26 22:13:17 +01:00 committed by GitHub
parent 1c2facf93c
commit 057ad2ab47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View File

@ -1204,7 +1204,7 @@ mod tests {
assert!(slot_hash_votes.contains(&pubkey));
}
// Check that the received votes were pushed to other commponents
// Check that the received votes were pushed to other components
// subscribing via `verified_vote_receiver`
let all_expected_slots: BTreeSet<_> = gossip_vote_slots
.clone()
@ -1332,7 +1332,7 @@ mod tests {
)
.unwrap();
// Check that the received votes were pushed to other commponents
// Check that the received votes were pushed to other components
// subscribing via a channel
let received_votes: Vec<_> = verified_vote_receiver.try_iter().collect();
assert_eq!(received_votes.len(), validator_voting_keypairs.len());

View File

@ -2872,7 +2872,7 @@ mod test {
expected_best_slot_hash
);
// All the stake dirctly voting on the duplicates have been outdated
// All the stake directly voting on the duplicates have been outdated
for (i, duplicate_leaf) in duplicate_leaves_descended_from_4.iter().enumerate() {
assert_eq!(
heaviest_subtree_fork_choice
@ -3843,11 +3843,11 @@ mod test {
}
// Mark the larger duplicate slot as confirmed, all slots should no longer
// have any unconfirmed duplicate ancestors, and should be marked as duplciate confirmed
// have any unconfirmed duplicate ancestors, and should be marked as duplicate confirmed
heaviest_subtree_fork_choice.mark_fork_valid_candidate(&larger_duplicate_slot.slot_hash());
for slot_hash_key in heaviest_subtree_fork_choice.fork_infos.keys() {
let slot = slot_hash_key.0;
// All slots <= the latest duplciate confirmed slot are ancestors of
// All slots <= the latest duplicate confirmed slot are ancestors of
// that slot, so they should all be marked duplicate confirmed
assert_eq!(
heaviest_subtree_fork_choice
@ -3878,7 +3878,7 @@ mod test {
heaviest_subtree_fork_choice.mark_fork_valid_candidate(&smaller_duplicate_slot.slot_hash());
for slot_hash_key in heaviest_subtree_fork_choice.fork_infos.keys() {
let slot = slot_hash_key.0;
// All slots <= the latest duplciate confirmed slot are ancestors of
// All slots <= the latest duplicate confirmed slot are ancestors of
// that slot, so they should all be marked duplicate confirmed
assert_eq!(
heaviest_subtree_fork_choice

View File

@ -6591,7 +6591,7 @@ pub(crate) mod tests {
vote_simulator.progress = progress;
vote_simulator.fill_bank_forks(forks, &HashMap::<Pubkey, Vec<u64>>::new(), true);
let (bank_forks, mut progress) = (vote_simulator.bank_forks, vote_simulator.progress);
// 4 is still the heaviest slot, but not votable beecause of lockout.
// 4 is still the heaviest slot, but not votable because of lockout.
// 9 is the deepest slot from our last voted fork (5), so it is what we should
// reset to.
let (vote_fork, reset_fork, heaviest_fork_failures) = run_compute_and_select_forks(
@ -6983,7 +6983,7 @@ pub(crate) mod tests {
let mut epoch_slots_frozen_slots = EpochSlotsFrozenSlots::default();
// Mark fork choice branch as invalid so select forks below doesn't panic
// on a nonexistent `heaviest_bank_on_same_fork` after we dump the duplciate fork.
// on a nonexistent `heaviest_bank_on_same_fork` after we dump the duplicate fork.
let duplicate_confirmed_state = DuplicateConfirmedState::new_from_state(
duplicate_confirmed_bank2_hash,
|| progress.is_dead(2).unwrap_or(false),

View File

@ -635,7 +635,7 @@ fn test_slots_to_snapshot(snapshot_version: SnapshotVersion, cluster_type: Clust
.unwrap()
.set_root(current_bank.slot(), &request_sender, None);
// Since the accounts background services are not runnning, EpochAccountsHash
// Since the accounts background services are not running, EpochAccountsHash
// calculation requests will not be handled. To prevent banks from hanging during
// Bank::freeze() due to waiting for EAH to complete, just set the EAH to Valid.
let epoch_accounts_hash_manager = &current_bank