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

feat: ConnectionManager extends EventEmitter & exposed on the Waku interface (& minor improvements) #1447

Merged
merged 5 commits into from
Jul 31, 2023

Conversation

danisharora099
Copy link
Collaborator

Problem

We recently introduced a method on the ConnectionManager class to fetch the discovered/connected peers tagged by their discovery protocols, and also made it an EventEmitter. However, there is no way to access the class currently.

Solution

This PR adds ConnectionManager on the Waku interface, making it easy to access it simply using waku.connectionManager.xyz()

This PR also improves the public/private accessors, and refactors the test file to use the new API.

@danisharora099 danisharora099 requested a review from a team as a code owner July 29, 2023 08:54
@github-actions
Copy link

github-actions bot commented Jul 29, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku core 30.26 KB (0%) 606 ms (0%) 2.2 s (+2.26% 🔺) 2.8 s
Waku Simple Light Node 235.43 KB (0%) 4.8 s (0%) 5.7 s (-13.49% 🔽) 10.5 s
ECIES encryption 28.54 KB (0%) 571 ms (0%) 1.2 s (-34.58% 🔽) 1.8 s
Symmetric encryption 28.55 KB (0%) 571 ms (0%) 2.3 s (+26.79% 🔺) 2.9 s
DNS discovery 108.36 KB (0%) 2.2 s (0%) 3.6 s (+12.33% 🔺) 5.8 s
Privacy preserving protocols 122.73 KB (0%) 2.5 s (0%) 3.7 s (+4.53% 🔺) 6.1 s
Light protocols 31.72 KB (0%) 635 ms (0%) 2.1 s (+75.97% 🔺) 2.8 s
History retrieval protocols 30.94 KB (0%) 619 ms (0%) 1.9 s (+5.64% 🔺) 2.5 s
Deterministic Message Hashing 5.78 KB (0%) 116 ms (0%) 772 ms (-5.42% 🔽) 887 ms

@danisharora099 danisharora099 changed the title chore: expose ConnectionManager on the Waku interface (& minor improvements) feat: expose ConnectionManager on the Waku interface (& minor improvements) Jul 29, 2023
@danisharora099 danisharora099 changed the title feat: expose ConnectionManager on the Waku interface (& minor improvements) feat: ConnectionManager extends EventEmitter & exposed on the Waku interface (& minor improvements) Jul 31, 2023
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.

2 participants