Skip to content

Commit

Permalink
Add default sanity check interval
Browse files Browse the repository at this point in the history
  • Loading branch information
hiepnv90 committed Jan 8, 2024
1 parent 3404995 commit 060fcdf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkg/listener/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
)

const (
bufLen = 100

maxQueueLen = 256
bufLen = 100
maxQueueLen = 256
defaultSanityCheckInterval = time.Minute

metricNameLastReceivedBlockNumber = "evmlistener_last_received_block_number"
metricNameLastCheckedBlockNumber = "evmlistener_last_checked_block_number"
Expand Down Expand Up @@ -64,6 +64,10 @@ func New(
v(&o)
}

if sanityCheckInterval == 0 {
sanityCheckInterval = defaultSanityCheckInterval
}

return &Listener{
l: l,

Expand Down

0 comments on commit 060fcdf

Please sign in to comment.