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

network-libp2p: Cleanup, fix and remove ToDos from the discovery behaviour #2058

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

jsdanielh
Copy link
Member

Cleanup, fix and remove ToDos from the discovery behaviour:

  • Fix the update the own_peer_contact.
  • Make sure that the own_peer_contact never gets to the peer_contacts.
  • Only update peer contacts if the timestamp is greater than ours and do not allow future timestamps.
  • Remove the unused clock argument from the behaviour and the network.
  • Make sure that the key of the peer contact matches the PeerId of the connection.
  • Remove the unused user_agent from the DiscoveryMessage message in the discovery protocol.

Pull request checklist

  • All tests pass. The project builds and runs.
  • I have resolved any merge conflicts.
  • I have resolved all clippy and rustfmt warnings.

…viour

Cleanup, fix and remove ToDos from the discovery behaviour:
- Fix the update the `own_peer_contact`.
- Make sure that the `own_peer_contact` never gets to the
  `peer_contacts`.
- Only update peer contacts if the timestamp is greater than ours and
  do not allow future timestamps.
- Remove the unused clock argument from the behaviour and the
  network.
- Make sure that the key of the peer contact matches the `PeerId` of
  the connection.
- Remove the unused `user_agent` from the `DiscoveryMessage` message in
  the discovery protocol.
@jsdanielh jsdanielh merged commit 22e218a into albatross Dec 18, 2023
6 checks passed
@jsdanielh jsdanielh deleted the jsdanielh/network4 branch December 18, 2023 17:25
@jsdanielh jsdanielh added this to the Nimiq PoS Mainnet milestone Jan 5, 2024
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.

2 participants