diff --git a/pkg/listener/listener.go b/pkg/listener/listener.go index 33797cd..37f98d5 100644 --- a/pkg/listener/listener.go +++ b/pkg/listener/listener.go @@ -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" @@ -64,6 +64,10 @@ func New( v(&o) } + if sanityCheckInterval == 0 { + sanityCheckInterval = defaultSanityCheckInterval + } + return &Listener{ l: l,