Skip to content

Commit

Permalink
ethmonitor: info log if fetchNextBlock times out
Browse files Browse the repository at this point in the history
  • Loading branch information
patrislav committed Aug 18, 2023
1 parent 4b6faf9 commit b0533ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ethmonitor/ethmonitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,11 @@ func (m *Monitor) monitor() error {
// ..
nextBlock, miss, err := m.fetchNextBlock(ctx)
if err != nil {
m.log.Warnf("ethmonitor: fetchNextBlock error reported '%v', for blockNum:%d, retrying..", err, m.nextBlockNumber.Uint64())
if errors.Is(err, context.DeadlineExceeded) {
m.log.Infof("ethmonitor: fetchNextBlock timed out: '%v', for blockNum:%d, retrying..", err, m.nextBlockNumber.Uint64())
} else {
m.log.Warnf("ethmonitor: fetchNextBlock error reported '%v', for blockNum:%d, retrying..", err, m.nextBlockNumber.Uint64())
}

// pause, then retry
time.Sleep(m.options.PollingInterval)
Expand Down

0 comments on commit b0533ef

Please sign in to comment.