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

* Set the correct root in block commitment cache initialization

* clean up test

* bump

(cherry picked from commit d9c259a231)

Co-authored-by: Justin Starry <justin@solana.com>
This commit is contained in:
mergify[bot]
2022-01-27 03:44:59 +00:00
committed by GitHub
parent d1174f677e
commit b0e0410003
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) {