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

Create Custom Error Type For Peer Connections #95

Open
GGist opened this issue Jul 10, 2017 · 0 comments
Open

Create Custom Error Type For Peer Connections #95

GGist opened this issue Jul 10, 2017 · 0 comments

Comments

@GGist
Copy link
Owner

GGist commented Jul 10, 2017

Currently we stash errors like payload checks, protocol errors, block size checks, etc in io::Error. However, tokio_io::codec::Decode and tokio_io::codec::Encode would allow us to specify some wrapper error.

Currently we store informative strings in the custom error type, so its not too difficult to track down why we severed a peer connection, but if we want client to be able to easily check why we severed the connection, and ban peers based on this, we need to export some enum of all possible error types they may want to ban on (as well as a catch all io::Error variant).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant