Merged
Conversation
minhd-vu
commented
Oct 23, 2024
| } | ||
|
|
||
| // Instruct server to connect to the new peer | ||
| server.AddTrustedPeer(node) |
Contributor
Author
There was a problem hiding this comment.
I think this was the problem, I think AddTrustedPeer has to wait a little for the next "peering" cycle, where as AddPeer will add the peer immediately.
minhd-vu
commented
Oct 23, 2024
| // Add DNS-discovered peers | ||
| for _, node := range tree.Nodes() { | ||
| if _, ok := peers[node.ID()]; !ok { | ||
| peers[node.ID()] = node.URLv4() |
Contributor
Author
There was a problem hiding this comment.
We acutally don't need to add the peer here, since a message to the peers channel will be emitted whenever we actually connect to the peer.
minhd-vu
commented
Oct 23, 2024
| log.Debug().Msgf("Discovered new peer: %s", node.URLv4()) | ||
|
|
||
| // Write peers to nodes file | ||
| if err := p2p.WritePeers(inputSensorParams.NodesFile, peers); err != nil { |
Contributor
Author
There was a problem hiding this comment.
We don't need to write the peers here. The other ticker will handle this.
| } | ||
|
|
||
| log.Info(). | ||
| Str("discover-dns", inputSensorParams.DiscoveryDNS). |
Contributor
There was a problem hiding this comment.
nit spelling: discovery-dns
rebelArtists
approved these changes
Oct 24, 2024
minhd-vu
added a commit
that referenced
this pull request
Oct 24, 2024
* add dns discovery to sensor logic * touch ups * fix: discovery dns (#410) * fix discovery dns * update gen-doc * fix error * fix typo --------- Co-authored-by: Minh Vu <minhd_vu@yahoo.com>
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
Jira / Linear Tickets
Testing