refactor(gossipsub): improve code legibility #5991
Merged
mergify[bot] merged 7 commits intolibp2p:masterfrom Apr 17, 2025
Merged
refactor(gossipsub): improve code legibility #5991mergify[bot] merged 7 commits intolibp2p:masterfrom
mergify[bot] merged 7 commits intolibp2p:masterfrom
Conversation
Contributor
|
This pull request has merge conflicts. Could you please resolve them @jxs? 🙏 |
elenaf9
approved these changes
Apr 17, 2025
| "HEARTBEAT: Mesh low. Topic contains: {} needs: {}", | ||
| peers.len(), | ||
| self.config.mesh_n_low() | ||
| self.config.mesh_n() |
Member
There was a problem hiding this comment.
But isn't mesh_n_low the minimum that it needs?
Member
Author
There was a problem hiding this comment.
not in this case, we target mesh_n, see two lines bellow:
rust-libp2p/protocols/gossipsub/src/behaviour.rs
Lines 2140 to 2141 in 46874bb
which conforms to the spec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
As part of working on the generalized
gossipsubstrategies I have been cleaning up code, here follows some of the improvements