mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-30 03:47:25 +00:00
committed by
Gavin Wood
parent
4ca6f8d1b2
commit
b92674d88a
@@ -222,6 +222,32 @@ pub mod generic {
|
||||
ChainSpecific(Vec<u8>),
|
||||
}
|
||||
|
||||
impl<Header, Hash, Number, Extrinsic> Message<Header, Hash, Number, Extrinsic> {
|
||||
/// Message id useful for logging.
|
||||
pub fn id(&self) -> &'static str {
|
||||
match self {
|
||||
Message::Status(_) => "Status",
|
||||
Message::BlockRequest(_) => "BlockRequest",
|
||||
Message::BlockResponse(_) => "BlockResponse",
|
||||
Message::BlockAnnounce(_) => "BlockAnnounce",
|
||||
Message::Transactions(_) => "Transactions",
|
||||
Message::Consensus(_) => "Consensus",
|
||||
Message::RemoteCallRequest(_) => "RemoteCallRequest",
|
||||
Message::RemoteCallResponse(_) => "RemoteCallResponse",
|
||||
Message::RemoteReadRequest(_) => "RemoteReadRequest",
|
||||
Message::RemoteReadResponse(_) => "RemoteReadResponse",
|
||||
Message::RemoteHeaderRequest(_) => "RemoteHeaderRequest",
|
||||
Message::RemoteHeaderResponse(_) => "RemoteHeaderResponse",
|
||||
Message::RemoteChangesRequest(_) => "RemoteChangesRequest",
|
||||
Message::RemoteChangesResponse(_) => "RemoteChangesResponse",
|
||||
Message::RemoteReadChildRequest(_) => "RemoteReadChildRequest",
|
||||
Message::FinalityProofRequest(_) => "FinalityProofRequest",
|
||||
Message::FinalityProofResponse(_) => "FinalityProofResponse",
|
||||
Message::ChainSpecific(_) => "ChainSpecific",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Status sent on connection.
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode)]
|
||||
pub struct Status<Hash, Number> {
|
||||
|
||||
Reference in New Issue
Block a user