Pubsub ignore messages from yourself (#4337)

* ignore messages from myself
This commit is contained in:
Preston Van Loon 2019-12-20 11:37:25 -08:00 committed by prylabs-bulldozer[bot]
parent 996f4c7f5a
commit a949673e33

View File

@ -158,6 +158,10 @@ func (r *Service) subscribe(topic string, validator pubsub.Validator, handle sub
continue
}
if msg.ReceivedFrom == r.p2p.PeerID() {
continue
}
messageReceivedCounter.WithLabelValues(topic + r.p2p.Encoding().ProtocolSuffix()).Inc()
go pipeline(msg)