@@ -58,8 +58,7 @@ pub struct HotColdDB<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> {
58
58
/// The starting slots for the range of data columns stored in the database.
59
59
data_column_info : RwLock < DataColumnInfo > ,
60
60
pub ( crate ) config : StoreConfig ,
61
- pub ( crate ) hierarchy : HierarchyModuli ,
62
- pub hierarchy_hot : HierarchyModuli ,
61
+ pub hierarchy : HierarchyModuli ,
63
62
/// Cold database containing compact historical data.
64
63
pub cold_db : Cold ,
65
64
/// Database containing blobs. If None, store falls back to use `cold_db`.
@@ -209,11 +208,9 @@ impl<E: EthSpec> HotColdDB<E, MemoryStore<E>, MemoryStore<E>> {
209
208
config. verify :: < E > ( ) ?;
210
209
211
210
let hierarchy = config. hierarchy_config . to_moduli ( ) ?;
212
- // TODO(hdiff): Use different exponents
211
+
213
212
// NOTE: Anchor slot is initialized to 0, which is only valid for new DBs. We shouldn't
214
213
// be reusing memory stores, but if we want to do that we should redo this.
215
- let hierarchy_hot = config. hierarchy_config . to_moduli ( ) ?;
216
-
217
214
let db = HotColdDB {
218
215
split : RwLock :: new ( Split :: default ( ) ) ,
219
216
anchor_info : RwLock :: new ( ANCHOR_UNINITIALIZED ) ,
@@ -233,7 +230,6 @@ impl<E: EthSpec> HotColdDB<E, MemoryStore<E>, MemoryStore<E>> {
233
230
) ) ,
234
231
config,
235
232
hierarchy,
236
- hierarchy_hot,
237
233
spec,
238
234
_phantom : PhantomData ,
239
235
} ;
@@ -260,9 +256,6 @@ impl<E: EthSpec> HotColdDB<E, BeaconNodeBackend<E>, BeaconNodeBackend<E>> {
260
256
261
257
let hierarchy = config. hierarchy_config . to_moduli ( ) ?;
262
258
263
- // TODO(hdiff): Use different exponents
264
- let hierarchy_hot = config. hierarchy_config . to_moduli ( ) ?;
265
-
266
259
debug ! ( ?hot_path, "Opening LevelDB" ) ;
267
260
let hot_db = BeaconNodeBackend :: open ( & config, hot_path) ?;
268
261
@@ -288,7 +281,6 @@ impl<E: EthSpec> HotColdDB<E, BeaconNodeBackend<E>, BeaconNodeBackend<E>> {
288
281
) ) ,
289
282
config,
290
283
hierarchy,
291
- hierarchy_hot,
292
284
spec,
293
285
_phantom : PhantomData ,
294
286
} ;
@@ -451,7 +443,7 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
451
443
452
444
pub fn hot_storage_strategy ( & self , slot : Slot ) -> Result < StorageStrategy , Error > {
453
445
Ok ( self
454
- . hierarchy_hot
446
+ . hierarchy
455
447
. storage_strategy ( slot, self . hot_hdiff_start_slot ( ) ?) ?)
456
448
}
457
449
0 commit comments