Skip to content

Conversation

@sfroment
Copy link
Contributor

@sfroment sfroment commented Dec 25, 2024

Title

[Fix ](fix: #2902)

Description

change the way the we call listen so that pubsubdisco can call the getAddresses

Notes & open questions

Detailed issue here #2902
(I don't think it's the good way of fixing this but I might be wrong)

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

Copy link
Member

@achingbrain achingbrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this PR - I'm going to merge #2904 instead but I wanted to add a quick note to the test here for future reference.

import { WebSockets, WebSocketsSecure } from '@multiformats/multiaddr-matcher'
import { expect } from 'aegir/chai'
import { isLoopbackAddr } from 'is-loopback-addr'
import { createLibp2p } from 'libp2p'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This module doesn't depend on libp2p but adding this test here would mean the dependency would need to be added.

This is intentional as it creates weird dependency loops that mean (among other things) a patch release of @libp2p/websockets would also cause a patch release of libp2p even if no changes were made there.

If you need to do integration-style testing, tests should be added to the integration-tests module, this won't cause any cascading releases.

@achingbrain
Copy link
Member

Closing in favour of #2904

@achingbrain achingbrain closed this Jan 6, 2025
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.

Listener is not ready yet (Websocket and pubsub discovery)

2 participants