This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Conversation
gterzian
reviewed
May 6, 2019
| if let Some(id) = incoming_nodes.iter().find(|(_, v)| **v == id).map(|(&id, _)| id) { | ||
| incoming_nodes.remove(&id); | ||
| } | ||
| assert!(connected_nodes.insert(id)); |
Contributor
There was a problem hiding this comment.
I think you might want to change this to assert!(connected_nodes.insert(id) || known_nodes.remove(id));, to account for an Accept message being received after discovered was called?
Contributor
Author
There was a problem hiding this comment.
known_nodes contains all the nodes that have been discovered in the past, not just nodes waiting for connection.
Member
|
@tomaka is this ready for merge? |
Contributor
Author
No, the test failure is legitimate but I don't know if it's an issue in the tests or in the PSM. |
Contributor
Author
|
Should be ready now. |
Contributor
Author
|
CI failure looks unrelated. |
gterzian
approved these changes
May 14, 2019
MTDK1
pushed a commit
to bdevux/substrate
that referenced
this pull request
Jul 10, 2019
* Randomly fuzz the PSM * Fix test * Run it moar
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
My take on #2200
Runs the peerset and randomly performs actions on it over time.
I'm aware of the fact that the tests fails, however I'm unsure whether it's the test that is wrong or if it's a bug in the PSM. If possible I'd be asking for reviews to see if what I'm doing is correct.