Actively manage dead slots in AncestorHashesService (#18912)
This commit is contained in:
@@ -1469,7 +1469,7 @@ pub mod test {
|
||||
let mut cluster_votes = HashMap::new();
|
||||
let votes = vec![0, 1, 2, 3, 4, 5];
|
||||
cluster_votes.insert(node_pubkey, votes.clone());
|
||||
vote_simulator.fill_bank_forks(forks, &cluster_votes);
|
||||
vote_simulator.fill_bank_forks(forks, &cluster_votes, true);
|
||||
|
||||
// Simulate the votes
|
||||
for vote in votes {
|
||||
@@ -1526,7 +1526,7 @@ pub mod test {
|
||||
/ tr(112))));
|
||||
|
||||
// Fill the BankForks according to the above fork structure
|
||||
vote_simulator.fill_bank_forks(forks, &HashMap::new());
|
||||
vote_simulator.fill_bank_forks(forks, &HashMap::new(), true);
|
||||
for (_, fork_progress) in vote_simulator.progress.iter_mut() {
|
||||
fork_progress.fork_stats.computed = true;
|
||||
}
|
||||
@@ -1947,7 +1947,7 @@ pub mod test {
|
||||
let mut cluster_votes: HashMap<Pubkey, Vec<Slot>> = HashMap::new();
|
||||
cluster_votes.insert(vote_simulator.node_pubkeys[1], vec![46]);
|
||||
cluster_votes.insert(vote_simulator.node_pubkeys[2], vec![47]);
|
||||
vote_simulator.fill_bank_forks(forks, &cluster_votes);
|
||||
vote_simulator.fill_bank_forks(forks, &cluster_votes, true);
|
||||
|
||||
// Vote on the first minor fork at slot 14, should succeed
|
||||
assert!(vote_simulator
|
||||
@@ -2023,7 +2023,7 @@ pub mod test {
|
||||
// Make the other validator vote fork to pass the threshold checks
|
||||
let other_votes = my_votes.clone();
|
||||
cluster_votes.insert(vote_simulator.node_pubkeys[1], other_votes);
|
||||
vote_simulator.fill_bank_forks(forks, &cluster_votes);
|
||||
vote_simulator.fill_bank_forks(forks, &cluster_votes, true);
|
||||
|
||||
// Simulate the votes.
|
||||
for vote in &my_votes {
|
||||
@@ -2567,7 +2567,7 @@ pub mod test {
|
||||
/ (tr(110) / tr(111))))));
|
||||
|
||||
// Fill the BankForks according to the above fork structure
|
||||
vote_simulator.fill_bank_forks(forks, &HashMap::new());
|
||||
vote_simulator.fill_bank_forks(forks, &HashMap::new(), true);
|
||||
for (_, fork_progress) in vote_simulator.progress.iter_mut() {
|
||||
fork_progress.fork_stats.computed = true;
|
||||
}
|
||||
@@ -2667,7 +2667,7 @@ pub mod test {
|
||||
let replayed_root_slot = 44;
|
||||
|
||||
// Fill the BankForks according to the above fork structure
|
||||
vote_simulator.fill_bank_forks(forks, &HashMap::new());
|
||||
vote_simulator.fill_bank_forks(forks, &HashMap::new(), true);
|
||||
for (_, fork_progress) in vote_simulator.progress.iter_mut() {
|
||||
fork_progress.fork_stats.computed = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user