Skip to content
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

protocols/request-response: Derive Clone for {Inbound,Outbound}Failure #1891

Merged
merged 3 commits into from Dec 16, 2020

Conversation

mxinden
Copy link
Member

@mxinden mxinden commented Dec 16, 2020

With InboundFailure and OutboundFailure implementing Clone a user of libp2p-request-response can handle a failure in one place, and record the failure for statistical purposes (e.g. a monitoring system) in a different place without the need to introduce a new structure for the latter code path.

While the above would benefit Substrate (see paritytech/substrate#7478 (comment)) it does allow ambiguity in terms of where an error that has been cloned before should be handled. For more details see the discussion on Substrate linked before.

@mxinden mxinden merged commit 0968b04 into libp2p:master Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants