This repository has been archived by the owner on Sep 7, 2023. It is now read-only.
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.
Integrates the probe state machine from probe-lab/go-kademlia#111 as part of probe-lab/go-kademlia#45
The include state machine is responsible for checking and adding nodes to the routing table. The probe state machine is responsible for checking and potentially removing nodes from the routing table. They operate independently but there is some cross-notification of events.
When the include state machine has performed an initial check it emits a
StateIncludeRoutingUpdated
state. This is used to notify the probe state machine that a new regular connectivity check must be created.When the probe state machine fails a check for a node it emits a
StateProbeNodeFailure
state. This is used to notify the include state machine to add the failed node as a candidate for inclusion as described in probe-lab/go-kademlia#45. This effectively gives the node a second chance, if it fails the inclusion check it is dropped completely.