cuprate/p2p/monero-p2p/src/error.rs
Boog900 2c4cc1fb93
move address book to separate crate.
Also changes the address book to use the network zone trait
2023-12-08 15:03:01 +00:00

15 lines
557 B
Rust

#[derive(Debug, thiserror::Error)]
pub enum PeerError {
#[error("The connection tasks client channel was closed")]
ClientChannelClosed,
#[error("error with peer response: {0}")]
ResponseError(&'static str),
#[error("the peer sent an incorrect response to our request")]
PeerSentIncorrectResponse,
#[error("bucket error")]
BucketError(#[from] monero_wire::BucketError),
#[error("handshake error: {0}")]
Handshake(#[from] crate::client::HandshakeError),
#[error("i/o error: {0}")]
IO(#[from] std::io::Error),
}