From 4b4c24e335bb81c6c98cac5200dcff7b75a6064b Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Sun, 8 Jan 2023 21:07:28 +0100 Subject: [PATCH] Remove inaccurate guess for db index --- beacon_node/store/src/hot_cold_store.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/beacon_node/store/src/hot_cold_store.rs b/beacon_node/store/src/hot_cold_store.rs index c6a276e9c3e..70aa368ad0c 100644 --- a/beacon_node/store/src/hot_cold_store.rs +++ b/beacon_node/store/src/hot_cold_store.rs @@ -94,7 +94,7 @@ pub enum HotColdDBError { MissingHotStateSummary(Hash256), MissingEpochBoundaryState(Hash256), MissingSplitState(Hash256, Slot), - MissingStateToPruneBlobs(Hash256, Slot), + MissingStateToPruneBlobs(Hash256), MissingExecutionPayload(Hash256), MissingFullBlockExecutionPayloadPruned(Hash256, Slot), MissingAnchorInfo, @@ -1710,15 +1710,9 @@ impl, Cold: ItemStore> HotColdDB } // Load the state from which to prune blobs so we can backtrack. - let erase_state = self - .get_state( - &data_availability_breakpoint, - Some(blob_info.last_pruned_epoch.end_slot(E::slots_per_epoch())), - )? - .ok_or(HotColdDBError::MissingStateToPruneBlobs( - data_availability_breakpoint, - blob_info.oldest_blob_slot, - ))?; + let erase_state = self.get_state(&data_availability_breakpoint, None)?.ok_or( + HotColdDBError::MissingStateToPruneBlobs(data_availability_breakpoint), + )?; // The data availability breakpoint is set at the start of an epoch indicating the epoch // before can be pruned.