diff --git a/beacon_node/store/src/hot_cold_store.rs b/beacon_node/store/src/hot_cold_store.rs index d1c4e295e99..f8bb3e84ad3 100644 --- a/beacon_node/store/src/hot_cold_store.rs +++ b/beacon_node/store/src/hot_cold_store.rs @@ -759,7 +759,7 @@ impl, Cold: ItemStore> HotColdDB let high_restore_point_idx = low_restore_point_idx + 1; // Acquire the read lock, so that the split can't change while this is happening. - let split = self.split.read(); + let split = self.split.read_recursive(); let low_restore_timer = metrics::start_timer(&metrics::LOAD_LOW_RESTORE_POINT_TIME); let low_restore_point = self.load_restore_point_by_index(low_restore_point_idx)?; @@ -950,7 +950,7 @@ impl, Cold: ItemStore> HotColdDB /// Fetch a copy of the current split slot from memory. pub fn get_split_slot(&self) -> Slot { - self.split.read().slot + self.split.read_recursive().slot } /// Fetch the slot of the most recently stored restore point. @@ -1123,7 +1123,7 @@ pub fn migrate_database, Cold: ItemStore>( // 0. Check that the migration is sensible. // The new frozen head must increase the current split slot, and lie on an epoch // boundary (in order for the hot state summary scheme to work). - let current_split_slot = store.split.read().slot; + let current_split_slot = store.split.read_recursive().slot; if frozen_head.slot() < current_split_slot { return Err(HotColdDBError::FreezeSlotError {