Commit 3c978c01 authored by Ethen Pociask's avatar Ethen Pociask

[indexer.bridge_offset_fix] Setting timestamp appropietly

parent c039ddbc
...@@ -189,12 +189,14 @@ func (db *blocksDB) LatestObservedEpoch(fromL1Height *big.Int, maxL1Range uint64 ...@@ -189,12 +189,14 @@ func (db *blocksDB) LatestObservedEpoch(fromL1Height *big.Int, maxL1Range uint64
result := db.gorm.Order("number desc").Take(&header) result := db.gorm.Order("number desc").Take(&header)
if result.Error != nil { if result.Error != nil {
if errors.Is(result.Error, gorm.ErrRecordNotFound) { if errors.Is(result.Error, gorm.ErrRecordNotFound) {
log.Warn("Could not fetch recent L1 block heade", "number", fromL1Height, log.Warn("Could not fetch recent L1 block header", "number", fromL1Height,
"processor", "bridge") "processor", "bridge")
return nil, nil return nil, nil
} }
return nil, result.Error return nil, result.Error
} }
fromL1Height = header.Number
} }
// Upper Bound (lowest timestamp indexed between L1/L2 bounded by `maxL1Range`) // Upper Bound (lowest timestamp indexed between L1/L2 bounded by `maxL1Range`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment