-
Notifications
You must be signed in to change notification settings - Fork 79
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
Implement ping/pong messages parsing and processing #430
Comments
This was referenced Oct 27, 2019
BTW, C# guys now really do use pings for something real: neo-project/neo#1024 |
roman-khimov
added a commit
that referenced
this issue
Jan 20, 2020
It makes to sense to do both actions, pings are made for a different purpose. Relates to #430.
roman-khimov
added a commit
that referenced
this issue
Jan 20, 2020
In reality it will never be true exactly in the case where we want this ping mechanism to work --- when the node failed to get a block from the net. It won't get the header either and thus its block height will be equal to header height. The only moment when this condition is met is when the node does initial synchronization and this synchronization works just fine without any pings. Relates to #430.
roman-khimov
added a commit
that referenced
this issue
Jan 20, 2020
We don't and we won't have synchronized clocks in the network so the only timestamp that we can compare our local time with is the one made ourselves. What this ping mechanism is used for is to recover from missing the block broadcast, thus it's appropriate for it to trigger after X seconds of the local time since the last block received. Relates to #430.
roman-khimov
added a commit
that referenced
this issue
Jan 20, 2020
1) Make timeout a timeout, don't do magic ping counts. 2) Drop additional timer from the main peer's protocol loop, create it dynamically and make it disconnect the peer. 3) Don't expose the ping counter to the outside, handle more logic inside the Peer. Relates to #430.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We don't currently support ping/pong functionality.
The text was updated successfully, but these errors were encountered: