Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pubsub should not return messages from local peer. #413

Open
ralexstokes opened this issue May 20, 2020 · 1 comment
Open

Pubsub should not return messages from local peer. #413

ralexstokes opened this issue May 20, 2020 · 1 comment

Comments

@ralexstokes
Copy link
Contributor

It looks like pubsub w/ gossipsub router yields messages we publish on the local peer to the local peer. This seems to be because we are using the same infrastructure to publish data as we are to read incoming data.

In particular, review use of self.subscribed_topics_receive[topic_id]. It seems like this is the only way right now to get gossip messages from others, but given the call to notify subscriptions in push_msg, we end up getting a reference to the message back locally.

@ralexstokes
Copy link
Contributor Author

i think the correct place to handle this right now is to only execute this line:

self.notify_subscriptions(msg)

if the message is not from the local peer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant