Skip to content

Conversation

@achingbrain
Copy link
Member

@achingbrain achingbrain commented Apr 16, 2023

Adds an event emitter as a libp2p component that will echo every emitted event on the main libp2p object.

Closes #1574
Fixes #1630

Adds an event emitter as a libp2p component that will echo every
emitted event on the main libp2p object.

Fixes #1574
achingbrain added a commit to libp2p/js-libp2p-interfaces that referenced this pull request Apr 16, 2023
achingbrain added a commit to libp2p/js-libp2p-interfaces that referenced this pull request Apr 21, 2023
Removes events from some internal components and adds them to the event bus.

Decouples internal components from each other since they can listen to the bus for events rather than having to know about the component that dispatches them.

Refs: libp2p/js-libp2p#1693
@achingbrain achingbrain marked this pull request as ready for review April 25, 2023 08:36
@achingbrain achingbrain requested a review from maschad April 25, 2023 11:10
@achingbrain
Copy link
Member Author

achingbrain commented Apr 25, 2023

Going to merge this to unblock #1563 - will address any PR comments in a follow up before 0.45.x is shipped.

@achingbrain achingbrain merged commit 17eb162 into master Apr 25, 2023
@achingbrain achingbrain deleted the feat/add-event-bus branch April 25, 2023 11:10
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.

bug: heliaInstance.libp2p.addEventListener('peer:discovery', cb) calls cb twice for same peer libp2p events

2 participants