persist set_root() and use it in blocktree_processor to limit squashes (#3782)

* rename locktower's slot to epoch

* persist set_root() and use it in blocktree_processor to limit squashes
This commit is contained in:
Rob Walker
2019-04-15 13:12:28 -07:00
committed by GitHub
parent 8963500aa8
commit 64c6f05da2
4 changed files with 61 additions and 62 deletions

View File

@@ -24,6 +24,8 @@ pub struct SlotMeta {
// True if this slot is full (consumed == last_index + 1) and if every
// slot that is a parent of this slot is also connected.
pub is_connected: bool,
// True if this slot is a root
pub is_root: bool,
}
impl SlotMeta {
@@ -51,6 +53,7 @@ impl SlotMeta {
parent_slot,
next_slots: vec![],
is_connected: slot == 0,
is_root: false,
last_index: std::u64::MAX,
}
}