@@ -199,9 +199,11 @@ func (d *slotExporterData) OnHead(_ *constypes.StandardEventHeadResponse) (err e
199199 for _ , dbSlot := range dbNonFinalSlots {
200200 nodeSlotFinalized := dbSlot .Slot <= head .FinalizedSlot
201201
202+ var header * constypes.StandardBeaconHeaderResponse
203+
202204 if nodeSlotFinalized != dbSlot .Finalized {
203205 log .Infof ("checking slot %d for finalization / reorgs" , dbSlot .Slot )
204- header , err : = d .Client .GetBlockHeader (dbSlot .Slot )
206+ header , err = d .Client .GetBlockHeader (dbSlot .Slot )
205207
206208 if err != nil {
207209 return fmt .Errorf ("error retrieving block root for slot %v: %w" , dbSlot .Slot , err )
@@ -271,15 +273,18 @@ func (d *slotExporterData) OnHead(_ *constypes.StandardEventHeadResponse) (err e
271273 }
272274 }
273275 }
274- } else { // check if a late slot has been proposed in the meantime
276+ } else {
277+ // check if a late slot has been proposed in the meantime
275278 // TODO: reenable once holesky is close to recovery
276- // if len(dbSlot.BlockRoot) < 32 && header != nil { // we have no slot in the db, but the node has a slot, export it
277- // log.Infof("exporting new slot %v", dbSlot.Slot)
278- // err := ExportSlot(d.Client, dbSlot.Slot, utils.EpochOfSlot(dbSlot.Slot) == head.HeadEpoch, tx)
279- // if err != nil {
280- // return fmt.Errorf("error exporting slot %v: %w", dbSlot.Slot, err)
281- // }
282- // }
279+ if utils .Config .Chain .Id != 17000 {
280+ if len (dbSlot .BlockRoot ) < 32 && header != nil { // we have no slot in the db, but the node has a slot, export it
281+ log .Infof ("exporting new slot %v" , dbSlot .Slot )
282+ err := ExportSlot (d .Client , dbSlot .Slot , utils .EpochOfSlot (dbSlot .Slot ) == head .HeadEpoch , tx )
283+ if err != nil {
284+ return fmt .Errorf ("error exporting slot %v: %w" , dbSlot .Slot , err )
285+ }
286+ }
287+ }
283288 }
284289 }
285290
0 commit comments