Skip to content

Conversation

@jxs
Copy link
Member

@jxs jxs commented Apr 17, 2025

Description

As part of working on the generalized gossipsub strategies I have been cleaning up code, here follows some of the improvements

@mergify
Copy link
Contributor

mergify bot commented Apr 17, 2025

This pull request has merge conflicts. Could you please resolve them @jxs? 🙏

"HEARTBEAT: Mesh low. Topic contains: {} needs: {}",
peers.len(),
self.config.mesh_n_low()
self.config.mesh_n()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But isn't mesh_n_low the minimum that it needs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not in this case, we target mesh_n, see two lines bellow:

// not enough peers - get mesh_n - current_length more
let desired_peers = self.config.mesh_n() - peers.len();

which conforms to the spec

@jxs jxs added the send-it label Apr 17, 2025
@mergify mergify bot merged commit 0a12aac into libp2p:master Apr 17, 2025
71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants