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

fix: discovery mechanism examples not working #1365

Merged
merged 4 commits into from
Sep 5, 2022

Conversation

mpetrunic
Copy link
Member

  • fixed tests that were passing even though the example isn't working
  • added timeouts to avoid infinite wait

Depends on:

resolves #1229

@mpetrunic mpetrunic marked this pull request as ready for review August 31, 2022 12:38
@mpetrunic
Copy link
Member Author

@achingbrain Is there a reason why peer:discovery event is triggered multiple times on the same node?

libp2p relay starting with id: 12D3KooWQpm1CYNjVMTSSD1bV5YtJnwKwyXDmzxBvBxVp9yBBpMA
Node 0 starting with id: 12D3KooWLCRsowjZhR91E4JLNZgC28mYa42RTGqohW18qXQwoCh3
Node 1 starting with id: 12D3KooWDrwiLiu4fDfnas7X9vuRCY2WQjJ3u43kheULbRzHRavT
Peer 12D3KooWLCRsowjZhR91E4JLNZgC28mYa42RTGqohW18qXQwoCh3 discovered: 12D3KooWQpm1CYNjVMTSSD1bV5YtJnwKwyXDmzxBvBxVp9yBBpMA
Peer 12D3KooWLCRsowjZhR91E4JLNZgC28mYa42RTGqohW18qXQwoCh3 discovered: 12D3KooWQpm1CYNjVMTSSD1bV5YtJnwKwyXDmzxBvBxVp9yBBpMA
Peer 12D3KooWLCRsowjZhR91E4JLNZgC28mYa42RTGqohW18qXQwoCh3 discovered: 12D3KooWQpm1CYNjVMTSSD1bV5YtJnwKwyXDmzxBvBxVp9yBBpMA
Peer 12D3KooWDrwiLiu4fDfnas7X9vuRCY2WQjJ3u43kheULbRzHRavT discovered: 12D3KooWQpm1CYNjVMTSSD1bV5YtJnwKwyXDmzxBvBxVp9yBBpMA
Peer 12D3KooWDrwiLiu4fDfnas7X9vuRCY2WQjJ3u43kheULbRzHRavT discovered: 12D3KooWQpm1CYNjVMTSSD1bV5YtJnwKwyXDmzxBvBxVp9yBBpMA
Peer 12D3KooWDrwiLiu4fDfnas7X9vuRCY2WQjJ3u43kheULbRzHRavT discovered: 12D3KooWQpm1CYNjVMTSSD1bV5YtJnwKwyXDmzxBvBxVp9yBBpMA
Peer 12D3KooWLCRsowjZhR91E4JLNZgC28mYa42RTGqohW18qXQwoCh3 discovered: 12D3KooWQpm1CYNjVMTSSD1bV5YtJnwKwyXDmzxBvBxVp9yBBpMA
Peer 12D3KooWLCRsowjZhR91E4JLNZgC28mYa42RTGqohW18qXQwoCh3 discovered: 12D3KooWQpm1CYNjVMTSSD1bV5YtJnwKwyXDmzxBvBxVp9yBBpMA
Peer 12D3KooWDrwiLiu4fDfnas7X9vuRCY2WQjJ3u43kheULbRzHRavT discovered: 12D3KooWQpm1CYNjVMTSSD1bV5YtJnwKwyXDmzxBvBxVp9yBBpMA
Peer 12D3KooWDrwiLiu4fDfnas7X9vuRCY2WQjJ3u43kheULbRzHRavT discovered: 12D3KooWQpm1CYNjVMTSSD1bV5YtJnwKwyXDmzxBvBxVp9yBBpMA
Peer 12D3KooWLCRsowjZhR91E4JLNZgC28mYa42RTGqohW18qXQwoCh3 discovered: 12D3KooWQpm1CYNjVMTSSD1bV5YtJnwKwyXDmzxBvBxVp9yBBpMA
Peer 12D3KooWLCRsowjZhR91E4JLNZgC28mYa42RTGqohW18qXQwoCh3 discovered: 12D3KooWQpm1CYNjVMTSSD1bV5YtJnwKwyXDmzxBvBxVp9yBBpMA
Peer 12D3KooWDrwiLiu4fDfnas7X9vuRCY2WQjJ3u43kheULbRzHRavT discovered: 12D3KooWQpm1CYNjVMTSSD1bV5YtJnwKwyXDmzxBvBxVp9yBBpMA
Peer 12D3KooWDrwiLiu4fDfnas7X9vuRCY2WQjJ3u43kheULbRzHRavT discovered: 12D3KooWQpm1CYNjVMTSSD1bV5YtJnwKwyXDmzxBvBxVp9yBBpMA
Peer 12D3KooWDrwiLiu4fDfnas7X9vuRCY2WQjJ3u43kheULbRzHRavT discovered: 12D3KooWLCRsowjZhR91E4JLNZgC28mYa42RTGqohW18qXQwoCh3

@achingbrain
Copy link
Member

The peer discovery events don't check to see if we know about the peer yet. Maybe they should but that's probably outside the scope of this PR.

@achingbrain achingbrain merged commit d281a60 into master Sep 5, 2022
@achingbrain achingbrain deleted the fix/pub-sub-discovery-example branch September 5, 2022 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discovery mechanisms example: Pubsub-Peer-Discovery not discovering peers.
2 participants