feat(net): add strategy to acquire effective peer if needed#5088
Merged
317787106 merged 28 commits intotronprotocol:release_v4.7.2from Mar 30, 2023
Merged
feat(net): add strategy to acquire effective peer if needed#5088317787106 merged 28 commits intotronprotocol:release_v4.7.2from
317787106 merged 28 commits intotronprotocol:release_v4.7.2from
Conversation
added 28 commits
March 16, 2023 18:09
…e deafult to true
|
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## release_v4.7.2 #5088 +/- ##
====================================================
+ Coverage 54.80% 54.97% +0.17%
- Complexity 8278 8331 +53
====================================================
Files 843 844 +1
Lines 49929 50027 +98
Branches 5513 5520 +7
====================================================
+ Hits 27362 27502 +140
+ Misses 20394 20340 -54
- Partials 2173 2185 +12 ☔ View full report in Codecov by Sentry. |
xxo1shine
approved these changes
Mar 30, 2023
jwrct
approved these changes
Mar 30, 2023
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.
What does this PR do?
Add a new strategy that check if the node is isolated; if so, then try to acquire an effective peer.
Why are these changes required?
Sometimes, all peers of one node need to sync from it, then the node is called isolated island. This node's head block number doesn't grow, we need to find an effective peer to sync and broadcast messages.
This PR has been tested by:
Follow up
Extra details