Skip to content

Commit 9a446e4

Browse files
committed
fix time rendering for genesis bpos
1 parent ab44148 commit 9a446e4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

handlers/index.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,11 @@ func buildIndexPageData() (*models.IndexPageData, time.Duration) {
303303
bpoIdx++
304304

305305
bpoEpoch := phase0.Epoch(0)
306+
bpoTime := blobSchedule.Timestamp
306307
if blobSchedule.Timestamp.After(networkGenesis.GenesisTime) {
307308
bpoEpoch = chainState.EpochOfSlot(chainState.TimeToSlot(blobSchedule.Timestamp))
309+
} else {
310+
bpoTime = networkGenesis.GenesisTime
308311
}
309312

310313
forkVersion := chainState.GetForkVersionAtEpoch(bpoEpoch)
@@ -318,7 +321,7 @@ func buildIndexPageData() (*models.IndexPageData, time.Duration) {
318321
Name: fmt.Sprintf("BPO%d", bpoIdx),
319322
Epoch: uint64(bpoEpoch),
320323
Version: nil,
321-
Time: uint64(blobSchedule.Timestamp.Unix()),
324+
Time: uint64(bpoTime.Unix()),
322325
Active: currentEpoch >= bpoEpoch,
323326
Type: "bpo",
324327
MaxBlobsPerBlock: &blobSchedule.Schedule.Max,

0 commit comments

Comments
 (0)