aboutsummaryrefslogtreecommitdiff
path: root/p2p/src/error.rs
diff options
context:
space:
mode:
authorhozan23 <hozan23@karyontech.net>2024-06-24 19:25:57 +0200
committerhozan23 <hozan23@karyontech.net>2024-06-24 19:25:57 +0200
commitcc6b474b0d35f5fa3f00a742b1c0e18a9a1a25a3 (patch)
tree48d6e9d5cdaa515127da1b8575550be25559fd9a /p2p/src/error.rs
parente3d1f4fd91a5f077fda8a1976e194c378ee166d0 (diff)
p2p: use base64 to encode PeerID to string
Diffstat (limited to 'p2p/src/error.rs')
-rw-r--r--p2p/src/error.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/p2p/src/error.rs b/p2p/src/error.rs
index 97b7b7f..a490b57 100644
--- a/p2p/src/error.rs
+++ b/p2p/src/error.rs
@@ -11,8 +11,11 @@ pub enum Error {
#[error("Unsupported protocol error: {0}")]
UnsupportedProtocol(String),
- #[error("Try from public key Error: {0}")]
- TryFromPublicKey(&'static str),
+ #[error("PeerID try from PublicKey Error")]
+ PeerIDTryFromPublicKey,
+
+ #[error("PeerID try from String Error")]
+ PeerIDTryFromString,
#[error("Invalid message error: {0}")]
InvalidMsg(String),
@@ -24,6 +27,9 @@ pub enum Error {
ParseIntError(#[from] std::num::ParseIntError),
#[error(transparent)]
+ ParseIntError2(#[from] base64::DecodeError),
+
+ #[error(transparent)]
ParseFloatError(#[from] std::num::ParseFloatError),
#[error(transparent)]