-
Notifications
You must be signed in to change notification settings - Fork 664
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
Check max peer is not passed. #1897
Conversation
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.
Can we add a test for this?
Codecov Report
@@ Coverage Diff @@
## staging #1897 +/- ##
===========================================
- Coverage 86.59% 86.51% -0.09%
===========================================
Files 166 167 +1
Lines 31572 31399 -173
===========================================
- Hits 27341 27165 -176
- Misses 4231 4234 +3
Continue to review full report at Codecov.
|
runner.push(Action::CheckRoutingTable(0, vec![(1, vec![1]), (2, vec![2])])); | ||
runner.push(Action::CheckRoutingTable(1, vec![(0, vec![0]), (2, vec![2])])); | ||
runner.push(Action::CheckRoutingTable(2, vec![(1, vec![1]), (0, vec![0])])); | ||
runner.push(Action::CheckRoutingTable(3, vec![])); |
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.
where is the number of peers checked?
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.
There routing table for peer 3 is empty since connection failed to establish.
runner.push(Action::CheckRoutingTable(3, vec![]));
is enough to notice that peer3 have no route to any other peer in the system.
From other routing table we see that the triangle is still alive and new node is not connected. This test would fail before this PR.
5683e4c
to
1cdcaf7
Compare
1cdcaf7
to
0d91c65
Compare
Remove some println
0c2e22d
to
73d3868
Compare
* Check max peer is not passed. * Solve racing incoming connections issues. * Add test * Update test * Fix fmt * Refactor network tests * Refactor account propagation + infinite loop Remove some println * Fix peer_recover * Move churn attack test out of routing
Make number of active peers don't exceed threshold from config.