Track a Bank's parent slot independently from parent bank (#7131)

This commit is contained in:
Sagar Dhawan
2019-11-25 15:34:51 -08:00
committed by GitHub
parent ef64f00cbb
commit 76a68c26c9
2 changed files with 8 additions and 7 deletions

View File

@ -141,13 +141,7 @@ impl StandardBroadcastRun {
{
self.slot_broadcast_start = Some(Instant::now());
let slot = bank.slot();
let parent_slot = {
if let Some(parent_bank) = bank.parent() {
parent_bank.slot()
} else {
0
}
};
let parent_slot = bank.parent_slot();
self.current_slot_and_parent = Some((slot, parent_slot));
receive_elapsed = Duration::new(0, 0);