-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
errors: Introduce immediate dial error and request-response rejection…
… reasons (#227) This PR makes several changes to the errors in general, with the main goal of extracting the reject-reason from the request response protocols: - an `ImmediateDial` error is introduced for failing to dial peers due to internal errors (no addresses available, tried to dial self, already connected etc) to distinguish between network dial failures - opening substreams now return a `SubstreamError` instead of using the overarching litep2p::Error - substreams are now implementing `Stream<Error = SubstreamError>` for consistency with opening substreams - Reject reasons include immediate dialing errors. Ideally, we could expose the same level of information that is exposed via `ListDialErrors` (provide a tuple of addresses with individual dial errors), however that would require a bigger refactor to the code. For now this information is enough for Substrate metrics to provide more information and align with litep2p metrics. This PR is part of a bigger effort to simply the overarching error enum: - #204 Closes: #188 --------- Signed-off-by: Alexandru Vasile <[email protected]>
- Loading branch information
Showing
27 changed files
with
331 additions
and
155 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.