mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 10:01:17 +00:00
introduce errors with info (#1834)
This commit is contained in:
committed by
GitHub
parent
40ea09389c
commit
f345123748
@@ -16,9 +16,13 @@
|
||||
|
||||
//! Network protocol types for parachains.
|
||||
|
||||
#![deny(unused_crate_dependencies, unused_results)]
|
||||
#![warn(missing_docs)]
|
||||
|
||||
use polkadot_primitives::v1::Hash;
|
||||
use parity_scale_codec::{Encode, Decode};
|
||||
use std::convert::TryFrom;
|
||||
use std::fmt;
|
||||
|
||||
pub use sc_network::{ReputationChange, PeerId};
|
||||
|
||||
@@ -32,6 +36,15 @@ pub type ProtocolVersion = u32;
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct WrongVariant;
|
||||
|
||||
impl fmt::Display for WrongVariant {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(formatter, "Wrong message variant")
|
||||
}
|
||||
}
|
||||
|
||||
impl std::error::Error for WrongVariant {}
|
||||
|
||||
|
||||
/// The peer-sets that the network manages. Different subsystems will use different peer-sets.
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum PeerSet {
|
||||
|
||||
Reference in New Issue
Block a user