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(gossipsub): add getter function to obtain TopicScoreParams #4231

Merged
merged 10 commits into from
Aug 3, 2023

Conversation

ackintosh
Copy link
Contributor

@ackintosh ackintosh commented Jul 22, 2023

Description

Added a getter function to obtain TopicScoreParams. I need this function for testing which checks if scoring parameters are updated as expected.

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
    • I haven't added a test as the function added is just getter but let me know if you think it is needed.
  • A changelog entry has been made in the appropriate crates

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jeff-mccoy Megamind
@ackintosh ackintosh marked this pull request as ready for review July 22, 2023 06:09
@ackintosh
Copy link
Contributor Author

The error on clippy (beta) seems it is not related to this PR.

https://github.com/libp2p/rust-libp2p/actions/runs/5629137542/job/15253767856?pr=4231

Error: thread 'rustc' panicked at 'DefId(146:722 ~ libp2p_swarm[28f4]::behaviour::NetworkBehaviour::ToSwarm) does not have a "type_of"', compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs:205:1

@ackintosh
Copy link
Contributor Author

@divagant-martian Thank you for your review!

@thomaseizinger thomaseizinger changed the title feat(gossipsub): Add getter function to obtain TopicScoreParams feat(gossipsub): add getter function to obtain TopicScoreParams Jul 29, 2023
Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

Thanks!

I think exposing this makes sense. I left some minor comments :)

ackintosh and others added 4 commits August 2, 2023 06:35
error[E0507]: cannot move out of `self.peer_score` which is behind a shared reference
@ackintosh
Copy link
Contributor Author

@thomaseizinger Thank you for your review! I've updated this PR.

thomaseizinger
thomaseizinger previously approved these changes Aug 2, 2023
Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@mxinden
Copy link
Member

mxinden commented Aug 3, 2023

@mergify refresh

@mergify
Copy link
Contributor

mergify bot commented Aug 3, 2023

refresh

✅ Pull request refreshed

@mxinden
Copy link
Member

mxinden commented Aug 3, 2023

@mergify refresh

@mergify
Copy link
Contributor

mergify bot commented Aug 3, 2023

refresh

✅ Pull request refreshed

@mxinden
Copy link
Member

mxinden commented Aug 3, 2023

Multiple conversations were unresolved and thus mergify did not merge. In addition, mergify does not have permissions to update your pull request @ackintosh. For future pull requests, mind giving mergify permissions on your fork?

@mergify mergify bot dismissed thomaseizinger’s stale review August 3, 2023 12:32

Approvals have been dismissed because the PR was updated after the send-it label was applied.

@mergify mergify bot merged commit f95f39f into libp2p:master Aug 3, 2023
@ackintosh ackintosh deleted the feature/getter-for-topic-params branch August 3, 2023 21:42
thomaseizinger pushed a commit that referenced this pull request Aug 20, 2023
Added a getter function to obtain `TopicScoreParams`. I need this function for testing which checks if scoring parameters are updated as expected.

Pull-Request: #4231.
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.

None yet

4 participants