mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 03:58:04 +00:00
Stop being generic over the message (#3186)
This commit is contained in:
committed by
Bastian Köcher
parent
9370a4a6b6
commit
8c919e031b
@@ -125,7 +125,6 @@ pub struct RemoteReadResponse {
|
||||
|
||||
/// Generic types.
|
||||
pub mod generic {
|
||||
use crate::custom_proto::CustomMessage;
|
||||
use parity_codec::{Encode, Decode};
|
||||
use runtime_primitives::Justification;
|
||||
use crate::config::Roles;
|
||||
@@ -210,18 +209,6 @@ pub mod generic {
|
||||
ChainSpecific(Vec<u8>),
|
||||
}
|
||||
|
||||
impl<Header, Hash, Number, Extrinsic> CustomMessage for Message<Header, Hash, Number, Extrinsic>
|
||||
where Self: Decode + Encode
|
||||
{
|
||||
fn into_bytes(self) -> Vec<u8> {
|
||||
self.encode()
|
||||
}
|
||||
|
||||
fn from_bytes(bytes: &[u8]) -> Result<Self, ()> {
|
||||
Decode::decode(&mut &bytes[..]).ok_or(())
|
||||
}
|
||||
}
|
||||
|
||||
/// Status sent on connection.
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode)]
|
||||
pub struct Status<Hash, Number> {
|
||||
|
||||
Reference in New Issue
Block a user