Print an error if an unregistered notifications protocol is used (#7457)

* Print an error if an nregistered notifications protocol is used

* Print an error if an nregistered notifications protocol is used

* Update client/network/src/service.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Pierre Krieger
2020-10-29 11:47:58 +01:00
committed by GitHub
parent f346e1c629
commit 950861e558
+5
View File
@@ -661,6 +661,11 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkService<B, H> {
if let Some(protocol_name) = protocol_name {
sink.send_sync_notification(protocol_name, message);
} else {
log::error!(
target: "sub-libp2p",
"Attempted to send notification on unknown protocol: {:?}",
engine_id,
);
return;
}