This repository was 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.7k
simplification of peerset api #2123
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
c86b760
Introduction of PeersetHandle
debris 97430fb
integrate PeersetHandle with the rest of the codebase
debris 12788ca
Merge branch 'master' into peerset-changes
debris 939cc30
fix compilation errors
debris 284fc7e
Merge branch 'master' into peerset-changes
debris 5a04f53
more tests for peerset, fixed overwriting bug in add_reserved_peer
debris 5037c8e
Merge branch 'master' into peerset-changes
debris 119bff4
Merge branch 'master' into peerset-changes
debris 141284e
Slots data structure and bugfixes for peerset
debris e849837
bend to pressure
debris 9ecb800
Merge branch 'master' into peerset-changes
debris a74b69c
updated lru-cache to 0.1.2 and updated linked-hash-map to 0.5.2
debris 94dc0f7
peerset discovered list is now a LinkedHashMap
debris 1a3d85f
Merge branch 'master' into peerset-changes
debris 832233a
fix review suggestions
debris 48a7abf
split back Peerset and PeersetHandle
debris 700f73b
test for Peerset::discovered
debris 169e606
applied review suggestions
debris 913f221
fixes to peerset::incoming
debris 21033d7
Merge branch 'master' into peerset-changes
debris 6bc7e14
peerset disconnects are all instantaneous
debris a92825f
instantaneous drop in peerset finished
debris ce5b4b2
Peerset::set_reserved_only can also reconnect nodes
debris a1fb988
Peerset scores cache uses lru-cache
debris 8b20252
remove redundant function call and comment from Peerset::on_set_reser…
debris 310cef2
add_peer returns SlotState enum
debris 3e2340d
apply review suggestions
debris de2525b
is_reserved -> is_connected_and_reserved
debris 494cca9
Merge branch 'master' into peerset-changes
debris 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 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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,13 +8,9 @@ authors = ["Parity Technologies <[email protected]>"] | |
| edition = "2018" | ||
|
|
||
| [dependencies] | ||
| fnv = "1.0" | ||
| futures = "0.1" | ||
| libp2p = { version = "0.6.0", default-features = false } | ||
| linked-hash-map = "0.5" | ||
| log = "0.4" | ||
| parking_lot = "0.7" | ||
| rand = "0.6" | ||
| serde = "1.0.70" | ||
| serde_derive = "1.0.70" | ||
| lru-cache = "0.1.2" | ||
| serde_json = "1.0.24" | ||
| tokio-io = "0.1" | ||
Oops, something went wrong.
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.
Just out of curiosity, why do you think it's better to clone on the call site? My preference would be to pass a reference and clone only if needed. In that case it doesn't really matter, since we know that current implementation requires ownership anyway, but IMHO passing reference is more future proof (shall the impl change).
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.
No, but we always need a value, cause we send it over the channel. That's why I changed the function signature