Skip to content

Commit

Permalink
Remove old stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigidity committed Aug 6, 2024
1 parent 7f39ef6 commit 41ffa0b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 46 deletions.
31 changes: 0 additions & 31 deletions crates/chia-client/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
use std::net::IpAddr;

use chia_protocol::ProtocolMessageTypes;
use semver::Version;
use thiserror::Error;
use tokio::sync::mpsc::error::SendError;
use tokio::sync::oneshot::error::RecvError;
use tokio::time::error::Elapsed;

use crate::Event;

#[derive(Debug, Error)]
pub enum Error {
#[error("Peer is missing certificate")]
MissingCertificate,

#[error("Handshake not received")]
ExpectedHandshake,

#[error("Invalid protocol version {0}")]
InvalidProtocolVersion(String),

#[error("Wrong network id {0}")]
WrongNetworkId(String),

#[error("Outdated protocol version {0}, expected {1}")]
OutdatedProtocolVersion(Version, Version),

#[error("Streamable error: {0}")]
Streamable(#[from] chia_traits::Error),

Expand All @@ -35,9 +16,6 @@ pub enum Error {
#[error("TLS error: {0}")]
Tls(#[from] native_tls::Error),

#[error("Banned peer: {0}")]
BannedPeer(IpAddr),

#[error("Unexpected message received with type {0:?}")]
UnexpectedMessage(ProtocolMessageTypes),

Expand All @@ -47,18 +25,9 @@ pub enum Error {
#[error("Failed to send event")]
EventNotSent,

#[error("Failed to send message")]
Send(#[from] SendError<Event>),

#[error("Failed to receive message")]
Recv(#[from] RecvError),

#[error("Connection timeout: {0}")]
ConnectionTimeout(Elapsed),

#[error("Handshake timeout: {0}")]
HandshakeTimeout(Elapsed),

#[error("IO error: {0}")]
Io(#[from] std::io::Error),
}
Expand Down
13 changes: 0 additions & 13 deletions crates/chia-client/src/event.rs

This file was deleted.

2 changes: 0 additions & 2 deletions crates/chia-client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
mod error;
mod event;
mod network;
mod peer;
mod request_map;
mod tls;

pub use error::*;
pub use event::*;
pub use network::*;
pub use peer::*;
pub use tls::*;

0 comments on commit 41ffa0b

Please sign in to comment.