add parent slot to broadcast

This commit is contained in:
Carl 2019-02-13 19:46:36 -08:00 committed by Michael Vines
parent ceb27b431e
commit d029997aef
1 changed files with 10 additions and 0 deletions

View File

@ -83,6 +83,16 @@ impl Broadcast {
// TODO: blob_index should be slot-relative...
index_blobs(&blobs, &mut self.blob_index, &slots);
let parent = {
if slots[0] == 0 {
0
} else {
slots[0] - 1
}
};
for b in blobs.iter() {
b.write().unwrap().set_parent(parent);
}
let to_blobs_elapsed = duration_as_ms(&to_blobs_start.elapsed());