From a949673e333f87380fb721eb206de8c03f83a794 Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Fri, 20 Dec 2019 11:37:25 -0800 Subject: [PATCH] Pubsub ignore messages from yourself (#4337) * ignore messages from myself --- beacon-chain/sync/subscriber.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/beacon-chain/sync/subscriber.go b/beacon-chain/sync/subscriber.go index a5afa1254..794f94e0f 100644 --- a/beacon-chain/sync/subscriber.go +++ b/beacon-chain/sync/subscriber.go @@ -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)