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

Add support for stream find nodes to Alexandria client / network #273

Open
njgheorghita opened this issue Dec 9, 2020 · 0 comments
Open

Comments

@njgheorghita
Copy link
Contributor

njgheorghita commented Dec 9, 2020

What was wrong?

Support for stream_find_nodes was recently added to v5_1 network & client. This api should be implemented for the Alexandria client and network.

How can it be fixed?

From #263 (comment)

Think it's going to be a little complicated to do it cleanly because we can expose a common subscribe(...) API but they use different message types for their FindNodes messages which makes a common implementation a bit more complex but doable.

First step is going to be proxying the subscription API so that it can be accessed directly from NetworkAPI.subscribe(...) (which under the hood simply proxies to the dispatcher).

Next you'll have to adjust this function to take the type of the FindNodesMessage.

And then you'll still have to deal with the fact that the messages are shaped differently and so you won't be able to access their payloads the same way... icky.

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

No branches or pull requests

1 participant