waku-org/go-waku

View on GitHub
waku/v2/protocol/rln/group_manager/dynamic/dynamic.go

Summary

Maintainability
A
3 hrs
Test Coverage
F
34%

Method DynamicGroupManager.handler has 54 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (gm *DynamicGroupManager) handler(events []*contracts.RLNMemberRegistered, latestProcessBlock uint64) error {
    gm.lastBlockProcessedMutex.Lock()
    defer gm.lastBlockProcessedMutex.Unlock()

    toRemoveTable := om.New()
Severity: Minor
Found in waku/v2/protocol/rln/group_manager/dynamic/dynamic.go - About 1 hr to fix

    Function NewDynamicGroupManager has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        ethClientAddr string,
        memContractAddr common.Address,
        membershipIndexToLoad *uint,
        appKeystore *keystore.AppKeystore,
        keystorePassword string,
    Severity: Major
    Found in waku/v2/protocol/rln/group_manager/dynamic/dynamic.go - About 1 hr to fix

      Method DynamicGroupManager.loadCredential has 6 return statements (exceeds 4 allowed).
      Open

      func (gm *DynamicGroupManager) loadCredential(ctx context.Context) error {
          if gm.appKeystore == nil {
              gm.log.Warn("no credentials were loaded. Node will only validate messages, but wont be able to generate proofs and attach them to messages")
              return nil
          }
      Severity: Major
      Found in waku/v2/protocol/rln/group_manager/dynamic/dynamic.go - About 40 mins to fix

        Method DynamicGroupManager.Start has 6 return statements (exceeds 4 allowed).
        Open

        func (gm *DynamicGroupManager) Start(ctx context.Context) error {
            if gm.cancel != nil {
                return errors.New("already started")
            }
        
        
        Severity: Major
        Found in waku/v2/protocol/rln/group_manager/dynamic/dynamic.go - About 40 mins to fix

          There are no issues that match your filters.

          Category
          Status