Added E::slots_per_epoch() to deneb time calculation (#7458)

Which issue # does this PR address?

Closes #7457


  Added `E::slots_per_epoch()` and now it ensures conversion from epochs to slots while calculating deneb time
This commit is contained in:
Odinson
2025-05-15 13:01:31 +05:30
committed by GitHub
parent c2c7fb87a8
commit 1853d836b7

View File

@@ -310,8 +310,10 @@ where
.map_err(|e| format!("Unable to read system time: {e:}"))?
.as_secs();
let genesis_time = genesis_state.genesis_time();
let deneb_time =
genesis_time + (deneb_fork_epoch.as_u64() * spec.seconds_per_slot);
let deneb_time = genesis_time
+ (deneb_fork_epoch.as_u64()
* E::slots_per_epoch()
* spec.seconds_per_slot);
// Shrink the blob availability window so users don't start
// a sync right before blobs start to disappear from the P2P