Skip to content

Commit

Permalink
Addressed Trent's review
Browse files Browse the repository at this point in the history
  • Loading branch information
lijunwangs committed Apr 26, 2023
1 parent 253e4b2 commit bf76b14
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions core/src/replay_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2025,16 +2025,15 @@ impl ReplayStage {
rooted_banks.push(root_bank.clone());
let rooted_slots: Vec<_> = rooted_banks.iter().map(|bank| bank.slot()).collect();
// The following differs from rooted_slots by including the parent slot of the oldest parent bank.
let rooted_slots_with_parents = if bank_notification_sender
let rooted_slots_with_parents = bank_notification_sender
.as_ref()
.map_or(false, |sender| sender.should_send_parents)
{
let mut new_chain = rooted_slots.clone();
new_chain.push(oldest_parent.unwrap_or(bank.parent_slot()));
Some(new_chain)
} else {
None
};
.then(|| {
let mut new_chain = rooted_slots.clone();
new_chain.push(oldest_parent.unwrap_or(bank.parent_slot()));
new_chain
});

// Call leader schedule_cache.set_root() before blockstore.set_root() because
// bank_forks.root is consumed by repair_service to update gossip, so we don't want to
// get shreds for repair on gossip before we update leader schedule, otherwise they may
Expand Down

0 comments on commit bf76b14

Please sign in to comment.