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: use placeholder dht/pubsub #1193

Merged
merged 7 commits into from
Apr 21, 2022
Merged

Conversation

achingbrain
Copy link
Member

Instead of making the .dht and .pubsub properties optional, use dummy implementations that throw exceptions if they are not configured.

This way we don't have to null guard everywhere they are accessed.

Instead of making the `.dht` and `.pubsub` properties optional, use
dummy implementations that throw exceptions if they are not configured.

This way we don't have to null guard everywhere they are accessed.
@achingbrain achingbrain merged commit 5397137 into master Apr 21, 2022
@achingbrain achingbrain deleted the fix/add-placeholder-dht-and-pubsub branch April 21, 2022 14:46
achingbrain added a commit to libp2p/js-libp2p-interfaces that referenced this pull request Apr 28, 2022
Since libp2p/js-libp2p#1193 there will be
values for pubsub and dht so no need to return them as maybe-undefined.
achingbrain added a commit to libp2p/js-libp2p-interfaces that referenced this pull request Apr 28, 2022
Since libp2p/js-libp2p#1193 there will be values for pubsub and dht so no need to return them as maybe-undefined.

Also make mock-muxer logs a little less chatty.
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.

1 participant