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

Account for protocols when querying connected peers #3190

Open
nazar-pc opened this issue Oct 29, 2024 · 0 comments
Open

Account for protocols when querying connected peers #3190

nazar-pc opened this issue Oct 29, 2024 · 0 comments
Labels
good first issue Good for newcomers networking Subspace networking (DSN) nice-to-have Non-critical but nice to have

Comments

@nazar-pc
Copy link
Member

nazar-pc commented Oct 29, 2024

PieceProvider::get_from_cache() start with querying connected peers, but currently Node::connected_peers() simply returns all connected peers regardless of what protocols they support.

This is a minor issue and only results in debug logs being printed, but would have been nice to account for connected peers that support specific request/response protocol to start with.

2024-10-23T17:37:42.328886Z DEBUG subspace_networking::utils::piece_provider: Failed to download cached piece from peer error=Underlying protocol returned an error: Problem on the network: The remote supports none of the requested protocols peer_id=12D3KooWSKAQm66N7jQme72obbPPquBSZuSqMyx5mH5ki1aZ4pGv piece_index=672
2024-10-23T17:37:42.328986Z DEBUG subspace_networking::utils::piece_provider: Failed to download cached piece from peer error=Underlying protocol returned an error: Problem on the network: The remote supports none of the requested protocols peer_id=12D3KooWSKAQm66N7jQme72obbPPquBSZuSqMyx5mH5ki1aZ4pGv piece_index=1634
@nazar-pc nazar-pc added good first issue Good for newcomers networking Subspace networking (DSN) nice-to-have Non-critical but nice to have labels Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers networking Subspace networking (DSN) nice-to-have Non-critical but nice to have
Projects
Development

No branches or pull requests

1 participant