Add new fork log message for when the node is leader for consistency (#6808)

This commit is contained in:
Michael Vines 2019-11-08 12:30:25 -07:00 committed by GitHub
parent 5b6c590057
commit b800642fa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 8 deletions

View File

@ -388,6 +388,7 @@ impl ReplayStage {
("leader", next_leader.to_string(), String),
);
info!("new fork:{} parent:{} (leader)", poh_slot, parent_slot);
let tpu_bank = bank_forks
.write()
.unwrap()
@ -895,21 +896,21 @@ impl ReplayStage {
next_slots.sort();
next_slots
});
for (parent_id, children) in next_slots {
for (parent_slot, children) in next_slots {
let parent_bank = frozen_banks
.get(&parent_id)
.get(&parent_slot)
.expect("missing parent in bank forks")
.clone();
for child_id in children {
if forks.get(child_id).is_some() {
trace!("child already active or frozen {}", child_id);
for child_slot in children {
if forks.get(child_slot).is_some() {
trace!("child already active or frozen {}", child_slot);
continue;
}
let leader = leader_schedule_cache
.slot_leader_at(child_id, Some(&parent_bank))
.slot_leader_at(child_slot, Some(&parent_bank))
.unwrap();
info!("new fork:{} parent:{}", child_id, parent_id);
forks.insert(Bank::new_from_parent(&parent_bank, &leader, child_id));
info!("new fork:{} parent:{}", child_slot, parent_slot);
forks.insert(Bank::new_from_parent(&parent_bank, &leader, child_slot));
}
}
}