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

feat(kad): make Distance private field public #5705

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

maqi
Copy link
Contributor

@maqi maqi commented Nov 29, 2024

Description

make Distance private field (U256) public

So that some network density in Distance can be calculated as below:

let density = U256::MAX / U256::from(estimated_network_size);
let density_distance = Distance(estimated_distance);

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@maqi
Copy link
Contributor Author

maqi commented Nov 29, 2024

Hi, @jxs @guillaumemichel ,

May this PR to be reviewed and approved to merge soon?
thx a lot.
We have project depends on this.

btw. the failing CI is not related to this PR.
seems PR #5702 tried to mute it, however is not preferred ?

Copy link
Contributor

@guillaumemichel guillaumemichel left a comment

Choose a reason for hiding this comment

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

Makes sense to me, thanks @maqi!

The failing CI check isn't a problem, we can merge anyway.

@maqi
Copy link
Contributor Author

maqi commented Nov 29, 2024

Hi, @guillaumemichel ,

thx a lot for the prompt approval.

Copy link
Member

@dariusc93 dariusc93 left a comment

Choose a reason for hiding this comment

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

LGTM

@guillaumemichel guillaumemichel added the send-it-batch send PR to the batch queue to run interop tests label Dec 3, 2024
@mergify mergify bot merged commit d0590a7 into libp2p:master Dec 3, 2024
70 of 71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
send-it-batch send PR to the batch queue to run interop tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants