synapsecns/sanguine

View on GitHub
ethergo/listener/listener.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method chainListener.doPoll has 61 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (c *chainListener) doPoll(parentCtx context.Context, handler HandleLog) (err error) {
    ctx, span := c.handler.Tracer().Start(parentCtx, "doPoll", trace.WithAttributes(attribute.Int(metrics.ChainID, int(c.chainID))))
    c.pollInterval = c.pollIntervalSetting

    // Note: in the case of an error, you don't have to handle the poll interval by calling b.duration.
Severity: Minor
Found in ethergo/listener/listener.go - About 1 hr to fix

    Method chainListener.doPoll has 7 return statements (exceeds 4 allowed).
    Open

    func (c *chainListener) doPoll(parentCtx context.Context, handler HandleLog) (err error) {
        ctx, span := c.handler.Tracer().Start(parentCtx, "doPoll", trace.WithAttributes(attribute.Int(metrics.ChainID, int(c.chainID))))
        c.pollInterval = c.pollIntervalSetting
    
        // Note: in the case of an error, you don't have to handle the poll interval by calling b.duration.
    Severity: Major
    Found in ethergo/listener/listener.go - About 45 mins to fix

      Function NewChainListener has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func NewChainListener(omnirpcClient client.EVM, store listenerDB.ChainListenerDB, address common.Address, initialBlock uint64, handler metrics.Handler, options ...Option) (ContractListener, error) {
      Severity: Minor
      Found in ethergo/listener/listener.go - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status