Skip to content

Commit a4f442c

Browse files
committed
Clean up some more TODOs
1 parent c39daf2 commit a4f442c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

beacon_node/store/src/hot_cold_store.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,15 +1483,15 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
14831483
state_slot = %state.slot(),
14841484
"State already exists in state cache",
14851485
);
1486-
// TODO(hdiff): do we still have issues with states being in the cache and not on
1487-
// disk? Maybe we need to ensure disk writes happen prior to cache inserts?
1488-
// return Ok(());
1486+
// NOTE: We used to return early here, but had some issues with states being
1487+
// in the cache but not on disk. Instead of relying on the cache we try loading
1488+
// the state summary below and rely on that instead.
14891489
}
14901490
PutStateOutcome::Finalized => {} // Continue to store.
14911491
}
14921492

1493-
// TODO(hdiff): is this optimization necessary? Computing diffs is expensive so we may want
1494-
// to avoid it.
1493+
// Computing diffs is expensive so we avoid it if we already have this state stored on
1494+
// disk.
14951495
if self.load_hot_state_summary(state_root)?.is_some() {
14961496
debug!(
14971497
slot = %state.slot(),

0 commit comments

Comments
 (0)