Skip to content

Commit cb11d8c

Browse files
authored
fix(store): add error details to log output during header batch write (#158)
The log output has been updated for a better troubleshooting experience when writing a batch of headers. Previously, when an error occurred, the log provided 'from' and 'to' ranges without specifying the actual error. Now, the 'err' parameter has been added to provide more information about the exact issue.
1 parent 0b32df0 commit cb11d8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

store/store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ func (s *Store[H]) flushLoop() {
424424
if err != nil {
425425
from, to := toFlush[0].Height(), toFlush[len(toFlush)-1].Height()
426426
// TODO(@Wondertan): Should this be a fatal error case with os.Exit?
427-
log.Errorw("writing header batch", "from", from, "to", to)
427+
log.Errorw("writing header batch", "from", from, "to", to, "err", err)
428428
s.metrics.flush(ctx, time.Since(startTime), s.pending.Len(), true)
429429
continue
430430
}

0 commit comments

Comments
 (0)