ethergo/listener/listener.go
Method chainListener.doPoll
has 61 lines of code (exceeds 50 allowed). Consider refactoring. Open
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.
Method chainListener.doPoll
has 7 return statements (exceeds 4 allowed). Open
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.
Function NewChainListener
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func NewChainListener(omnirpcClient client.EVM, store listenerDB.ChainListenerDB, address common.Address, initialBlock uint64, handler metrics.Handler, options ...Option) (ContractListener, error) {