synapsecns/sanguine

View on GitHub
ethergo/submitter/chain_queue.go

Summary

Maintainability
B
4 hrs
Test Coverage

Method txSubmitterImpl.chainPendingQueue has 70 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (t *txSubmitterImpl) chainPendingQueue(parentCtx context.Context, chainID *big.Int, txes []db.TX) (err error) {
    ctx, span := t.metrics.Tracer().Start(parentCtx, "submitter.ChainQueue", trace.WithAttributes(
        attribute.String("chain_id", chainID.String()),
    ))
    defer func() {
Severity: Minor
Found in ethergo/submitter/chain_queue.go - About 1 hr to fix

    Method chainQueue.bumpTX has 63 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (c *chainQueue) bumpTX(parentCtx context.Context, ogTx db.TX) (err error) {
        if !c.isBumpIntervalElapsed(ogTx) {
            c.addToReprocessQueue(ogTx)
            return nil
        }
    Severity: Minor
    Found in ethergo/submitter/chain_queue.go - About 1 hr to fix

      Method chainQueue.bumpTX has 7 return statements (exceeds 4 allowed).
      Open

      func (c *chainQueue) bumpTX(parentCtx context.Context, ogTx db.TX) (err error) {
          if !c.isBumpIntervalElapsed(ogTx) {
              c.addToReprocessQueue(ogTx)
              return nil
          }
      Severity: Major
      Found in ethergo/submitter/chain_queue.go - About 45 mins to fix

        Method txSubmitterImpl.chainPendingQueue has 5 return statements (exceeds 4 allowed).
        Open

        func (t *txSubmitterImpl) chainPendingQueue(parentCtx context.Context, chainID *big.Int, txes []db.TX) (err error) {
            ctx, span := t.metrics.Tracer().Start(parentCtx, "submitter.ChainQueue", trace.WithAttributes(
                attribute.String("chain_id", chainID.String()),
            ))
            defer func() {
        Severity: Major
        Found in ethergo/submitter/chain_queue.go - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status