Set the correct root in block commitment cache initialization (#22750)

* Set the correct root in block commitment cache initialization

* clean up test

* bump
This commit is contained in:
Justin Starry
2022-01-27 00:48:00 +08:00
committed by GitHub
parent 071e97053f
commit d9c259a231
4 changed files with 26 additions and 33 deletions

View File

@@ -193,9 +193,9 @@ impl BlockCommitmentCache {
self.commitment_slots.highest_confirmed_root = root;
}
pub fn initialize_slots(&mut self, slot: Slot) {
pub fn initialize_slots(&mut self, slot: Slot, root: Slot) {
self.commitment_slots.slot = slot;
self.commitment_slots.root = slot;
self.commitment_slots.root = root;
}
pub fn set_all_slots(&mut self, slot: Slot, root: Slot) {