waku-org/go-waku

View on GitHub

Showing 300 of 401 total issues

Method WakuLightPush.request has 6 return statements (exceeds 4 allowed).
Open

func (wakuLP *WakuLightPush) request(ctx context.Context, req *pb.PushRequest, params *lightPushRequestParameters, peerID peer.ID) (*pb.PushResponse, error) {

    logger := wakuLP.log.With(logging.HostID("peer", peerID))

    stream, err := wakuLP.h.NewStream(ctx, peerID, LightPushID_v20beta1)
Severity: Major
Found in waku/v2/protocol/lightpush/waku_lightpush.go - About 40 mins to fix

    Function buildTransactor has 6 return statements (exceeds 4 allowed).
    Open

    func buildTransactor(ctx context.Context, membershipFee *big.Int, chainID *big.Int) (*bind.TransactOpts, error) {
        auth, err := bind.NewKeyedTransactorWithChainID(options.ETHPrivateKey, chainID)
        if err != nil {
            return nil, err
        }
    Severity: Major
    Found in cmd/waku/rlngenerate/web3.go - About 40 mins to fix

      Method FilterSubscribeRequest.Validate has 6 return statements (exceeds 4 allowed).
      Open

      func (x *FilterSubscribeRequest) Validate() error {
          if x.RequestId == "" {
              return errMissingRequestID
          }
      
      
      Severity: Major
      Found in waku/v2/protocol/filter/pb/validation.go - About 40 mins to fix

        Method MissingMessageVerifier.fetchMessagesBatch has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        func (m *MissingMessageVerifier) fetchMessagesBatch(c chan<- *protocol.Envelope, interest criteriaInterest, batchFrom int, batchTo int, now time.Time) error {
        Severity: Minor
        Found in waku/v2/api/missing/missing_messages.go - About 35 mins to fix

          Function NewConnectionNotifier has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          func NewConnectionNotifier(ctx context.Context, h host.Host, connNotifCh chan<- PeerConnection, metrics Metrics, log *zap.Logger) ConnectionNotifier {
          Severity: Minor
          Found in waku/v2/node/connectedness.go - About 35 mins to fix

            Function WaitForTimeout has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            func WaitForTimeout(t *testing.T, ctx context.Context, timeout time.Duration, wg *sync.WaitGroup, ch chan *protocol.Envelope) {
            Severity: Minor
            Found in tests/utils.go - About 35 mins to fix

              Method defaultStorenodeMessageVerifier.MessageHashesExist has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              func (d *defaultStorenodeMessageVerifier) MessageHashesExist(ctx context.Context, requestID []byte, peerID peer.ID, pageSize uint64, messageHashes []pb.MessageHash) ([]pb.MessageHash, error) {
              Severity: Minor
              Found in waku/v2/api/publish/default_verifier.go - About 35 mins to fix

                Function createHostWithDiscv5AndPM has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                func createHostWithDiscv5AndPM(t *testing.T, hostName string, topic string, enrField uint8, bootnode ...*enode.Node) (host.Host, *PeerManager, *discv5.DiscoveryV5) {
                Severity: Minor
                Found in waku/v2/peermanager/peer_manager_test.go - About 35 mins to fix

                  Method PeerManager.discoverOnDemand has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  func (pm *PeerManager) discoverOnDemand(cluster uint16,
                      shard uint16, wakuProtocol protocol.ID, ctx context.Context, maxCount int) ([]service.PeerData, error) {
                  Severity: Minor
                  Found in waku/v2/peermanager/peer_discovery.go - About 35 mins to fix

                    Method Rendezvous.DiscoverShard has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    func (r *Rendezvous) DiscoverShard(ctx context.Context, rp *RendezvousPoint, cluster uint16, shard uint16, numPeers int) {
                    Severity: Minor
                    Found in waku/v2/rendezvous/rendezvous.go - About 35 mins to fix

                      Method PeerManager.addPeer has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      func (pm *PeerManager) addPeer(ID peer.ID, addrs []ma.Multiaddr, origin wps.Origin, pubSubTopics []string, protocols ...protocol.ID) error {
                      Severity: Minor
                      Found in waku/v2/peermanager/peer_manager.go - About 35 mins to fix

                        Function NewMissingMessageVerifier has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        func NewMissingMessageVerifier(storenodeRequester common.StorenodeRequestor, messageTracker MessageTracker, timesource timesource.Timesource, logger *zap.Logger, options ...MissingMessageVerifierOption) *MissingMessageVerifier {
                        Severity: Minor
                        Found in waku/v2/api/missing/missing_messages.go - About 35 mins to fix

                          Method PeerManager.DiscoverAndConnectToPeers has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          func (pm *PeerManager) DiscoverAndConnectToPeers(ctx context.Context, cluster uint16,
                              shard uint16, serviceProtocol protocol.ID, maxCount int) error {
                          Severity: Minor
                          Found in waku/v2/peermanager/peer_discovery.go - About 35 mins to fix

                            Function waku_add_peer has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            func waku_add_peer(ctx unsafe.Pointer, address *C.char, protocolID *C.char, cb C.WakuCallBack, userData unsafe.Pointer) C.int {
                            Severity: Minor
                            Found in library/c/api.go - About 35 mins to fix

                              Function NewContentTopic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              func NewContentTopic(applicationName string, applicationVersion string,
                                  contentTopicName string, encoding string, opts ...ContentTopicOption) (ContentTopic, error) {
                              Severity: Minor
                              Found in waku/v2/protocol/content_topic.go - About 35 mins to fix

                                Function waku_connect_peerid has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                func waku_connect_peerid(ctx unsafe.Pointer, peerID *C.char, ms C.int, cb C.WakuCallBack, userData unsafe.Pointer) C.int {
                                Severity: Minor
                                Found in library/c/api.go - About 35 mins to fix

                                  Function NewWakuLightPush has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  func NewWakuLightPush(relay *relay.WakuRelay, pm *peermanager.PeerManager, reg prometheus.Registerer, log *zap.Logger, opts ...Option) *WakuLightPush {
                                  Severity: Minor
                                  Found in waku/v2/protocol/lightpush/waku_lightpush.go - About 35 mins to fix

                                    Function LightpushPublish has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    func LightpushPublish(instance *WakuInstance, messageJSON string, pubsubTopic string, peerID string, ms int) (string, error) {
                                    Severity: Minor
                                    Found in library/lightpush.go - About 35 mins to fix

                                      Function waku_encode_asymmetric has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      func waku_encode_asymmetric(messageJSON *C.char, publicKey *C.char, optionalSigningKey *C.char, cb C.WakuCallBack, userData unsafe.Pointer) C.int {
                                      Severity: Minor
                                      Found in library/c/api_encoding.go - About 35 mins to fix

                                        Function waku_connect has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                        func waku_connect(ctx unsafe.Pointer, address *C.char, ms C.int, cb C.WakuCallBack, userData unsafe.Pointer) C.int {
                                        Severity: Minor
                                        Found in library/c/api.go - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language