Merge pull request #6162 from paritytech/fix-whisper-sub-name
fix subscription name
This commit is contained in:
commit
d53028d0a8
@ -282,9 +282,11 @@ impl FullDependencies {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
Api::EthPubSub => {
|
Api::EthPubSub => {
|
||||||
let client = EthPubSubClient::new(self.client.clone(), self.remote.clone());
|
if !for_generic_pubsub {
|
||||||
self.client.add_notify(client.handler());
|
let client = EthPubSubClient::new(self.client.clone(), self.remote.clone());
|
||||||
handler.extend_with(client.to_delegate());
|
self.client.add_notify(client.handler());
|
||||||
|
handler.extend_with(client.to_delegate());
|
||||||
|
}
|
||||||
},
|
},
|
||||||
Api::Personal => {
|
Api::Personal => {
|
||||||
handler.extend_with(PersonalClient::new(&self.secret_store, dispatcher.clone(), self.geth_compatibility).to_delegate());
|
handler.extend_with(PersonalClient::new(&self.secret_store, dispatcher.clone(), self.geth_compatibility).to_delegate());
|
||||||
@ -353,9 +355,13 @@ impl FullDependencies {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Api::WhisperPubSub => {
|
Api::WhisperPubSub => {
|
||||||
if let Some(ref whisper_rpc) = self.whisper_rpc {
|
if !for_generic_pubsub {
|
||||||
let whisper = whisper_rpc.make_handler();
|
if let Some(ref whisper_rpc) = self.whisper_rpc {
|
||||||
handler.extend_with(::parity_whisper::rpc::WhisperPubSub::to_delegate(whisper));
|
let whisper = whisper_rpc.make_handler();
|
||||||
|
handler.extend_with(
|
||||||
|
::parity_whisper::rpc::WhisperPubSub::to_delegate(whisper)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,9 +132,9 @@ build_rpc_trait! {
|
|||||||
pub trait WhisperPubSub {
|
pub trait WhisperPubSub {
|
||||||
type Metadata;
|
type Metadata;
|
||||||
|
|
||||||
#[pubsub(name = "hello")] {
|
#[pubsub(name = "shh_subscription")] {
|
||||||
/// Subscribe to messages matching the filter.
|
/// Subscribe to messages matching the filter.
|
||||||
#[rpc(name = "ssh_subscribe")]
|
#[rpc(name = "shh_subscribe")]
|
||||||
fn subscribe(&self, Self::Metadata, pubsub::Subscriber<types::FilterItem>, types::FilterRequest);
|
fn subscribe(&self, Self::Metadata, pubsub::Subscriber<types::FilterItem>, types::FilterRequest);
|
||||||
|
|
||||||
/// Unsubscribe from filter matching given ID. Return
|
/// Unsubscribe from filter matching given ID. Return
|
||||||
|
Loading…
Reference in New Issue
Block a user