Skip to content

Commit

Permalink
remove notification from outside broadcaster in relay
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyaprem committed Oct 16, 2023
1 parent 06dd50a commit b4b9e3d
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions waku/v2/protocol/relay/waku_relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/libp2p/go-libp2p/p2p/host/eventbus"
"github.com/prometheus/client_golang/prometheus"
"go.uber.org/zap"
"golang.org/x/exp/slices"
proto "google.golang.org/protobuf/proto"

pubsub "github.com/libp2p/go-libp2p-pubsub"
Expand Down Expand Up @@ -584,18 +583,6 @@ func (w *WakuRelay) topicMsgHandler(pubsubTopic string, sub *pubsub.Subscription
w.metrics.RecordMessage(envelope)

w.bcaster.Submit(envelope)

//Notify to all subscriptions for this topic
sub, ok := w.contentSubs[pubsubTopic]
if ok {
//Filter and notify only
// - if contentFilter doesn't have a contentTopic
// - if contentFilter has contentTopics and it matches with message
if len(sub.contentFilter.ContentTopicsList()) == 0 || (len(sub.contentFilter.ContentTopicsList()) > 0 &&
slices.Contains[string](sub.contentFilter.ContentTopicsList(), wakuMessage.ContentTopic)) {
sub.Ch <- envelope
}
}
}
}

Expand Down

0 comments on commit b4b9e3d

Please sign in to comment.