This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
client/authority-discovery: Append PeerId to Multiaddr at most once #6933
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
95e948f
client/authority-discovery/worker: Extract address getter
mxinden cdd0ecf
client/authority-discovery: Test for no duplicate p2p components
mxinden 5d63b1d
client/authority-discovery: Append PeerId to Multiaddr at most once
mxinden 7d51f6c
client/authority-discovery: Remove explicit return
mxinden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO returning a Iterator does not makes that much sense here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Within Substrate we already depend on
either
13 times, in addition, without thederive
featureeither
doesn't have any dependencies. Is this not a trade off worth taking?True. In the case of sentry nodes this is sub optimal, but in the case of a validator itself it removes the need for one Iterator conversion (i.e.
Vec -> Iterator -> filter -> inner to_vec -> Vec
instead ofVec -> Iterator -> filter -> Vec -> Iterator -> inner to vec -> Vec
). With the fact in mind that sentry nodes are deprecated (#6845) I think optimizing for the latter makes more sense. Lastly I very much doubt this has an impact in the first place as it is executed every 12 h only.Does the above make sense @bkchr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah fine by me.
This was also no blocker by me ;)