only add pubsub if generic pubsub off

This commit is contained in:
Robert Habermeier 2017-07-27 12:52:36 +02:00
parent 1be3e5ec5e
commit 18fbf3c174

View File

@ -282,9 +282,11 @@ impl FullDependencies {
} }
}, },
Api::EthPubSub => { Api::EthPubSub => {
if !for_generic_pubsub {
let client = EthPubSubClient::new(self.client.clone(), self.remote.clone()); let client = EthPubSubClient::new(self.client.clone(), self.remote.clone());
self.client.add_notify(client.handler()); self.client.add_notify(client.handler());
handler.extend_with(client.to_delegate()); 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 !for_generic_pubsub {
if let Some(ref whisper_rpc) = self.whisper_rpc { if let Some(ref whisper_rpc) = self.whisper_rpc {
let whisper = whisper_rpc.make_handler(); let whisper = whisper_rpc.make_handler();
handler.extend_with(::parity_whisper::rpc::WhisperPubSub::to_delegate(whisper)); handler.extend_with(
::parity_whisper::rpc::WhisperPubSub::to_delegate(whisper)
);
}
} }
} }
} }