mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 07:41:08 +00:00
introduce errors with info (#1834)
This commit is contained in:
committed by
GitHub
parent
40ea09389c
commit
f345123748
@@ -9,6 +9,4 @@ description = "Primitives types for the Node-side"
|
||||
polkadot-primitives = { path = "../../../primitives" }
|
||||
polkadot-node-primitives = { path = "../../primitives" }
|
||||
parity-scale-codec = { version = "1.3.4", default-features = false, features = ["derive"] }
|
||||
runtime_primitives = { package = "sp-runtime", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
|
||||
@@ -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