Skip to content

Commit 1853d83

Browse files
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
1 parent c2c7fb8 commit 1853d83

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

beacon_node/client/src/builder.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,10 @@ where
310310
.map_err(|e| format!("Unable to read system time: {e:}"))?
311311
.as_secs();
312312
let genesis_time = genesis_state.genesis_time();
313-
let deneb_time =
314-
genesis_time + (deneb_fork_epoch.as_u64() * spec.seconds_per_slot);
313+
let deneb_time = genesis_time
314+
+ (deneb_fork_epoch.as_u64()
315+
* E::slots_per_epoch()
316+
* spec.seconds_per_slot);
315317

316318
// Shrink the blob availability window so users don't start
317319
// a sync right before blobs start to disappear from the P2P

0 commit comments

Comments
 (0)