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

Couple the send_queue more closely with connected peers #561

Merged
merged 3 commits into from
Dec 19, 2023

Conversation

AgeManning
Copy link
Member

It is difficult to reason about handler send queues and if in fact they are always in sync with the connected_peer mappings.

This shifts the send-queues inside the connected_peers mapping to ensure that if there is a connected peer, then it should have a send_queue.

This prevents any kind of panics that may arise if the send-queue mapping is out of sync with the connected peer mapping. There may still be panics if the connected_peer list is out of sync with mesh or topic mappings, however that is out of scope of this PR.

As gossipsub has been running for a while, we assume the above mappings are correct.

@AgeManning AgeManning merged commit 3ef0814 into lighthouse-gossipsub Dec 19, 2023
65 of 68 checks passed
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