Log block hash if watcher fails to read timestamp

This commit is contained in:
Bruce Riley 2022-09-19 16:20:49 +00:00 committed by Evan Gray
parent cbce1e7c1f
commit 3fc357ebcd
1 changed files with 2 additions and 1 deletions

View File

@ -338,7 +338,8 @@ func (e *Watcher) Run(ctx context.Context) error {
if err != nil {
ethConnectionErrors.WithLabelValues(e.networkName, "block_by_number_error").Inc()
p2p.DefaultRegistry.AddErrorCount(e.chainID, 1)
errC <- fmt.Errorf("failed to request timestamp for block %d: %w", ev.Raw.BlockNumber, err)
errC <- fmt.Errorf("failed to request timestamp for block %d, hash %s: %w",
ev.Raw.BlockNumber, ev.Raw.BlockHash.String(), err)
return
}