-
Notifications
You must be signed in to change notification settings - Fork 142
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
refactor(sync): refactoring syncing process #676
Conversation
Codecov Report
@@ Coverage Diff @@
## main #676 +/- ##
==========================================
- Coverage 83.70% 83.50% -0.21%
==========================================
Files 167 168 +1
Lines 8009 7922 -87
==========================================
- Hits 6704 6615 -89
- Misses 1002 1004 +2
Partials 303 303 |
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.
LGTM.
That's exactly what we discussed!
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.
@b00f
please resolve request changes.
@b00f |
@amirvalhalla could you please double check it. If anything missed, mention me. |
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.
@b00f
please resolve request changes.
Description
This PR includes these changes:
1-
HeartBeat
message is removed.2-
HelloAck
message is added. Once a node receives aHelloAck
, it can start sending messages.3-
MaxOpenSessions
is removed and the maximum number of sessions should be the same as the number of connected peers.4- Syncing process is based on time, not height. If the last block time is more than 20 seconds behind the current time, the node starts syncing.