Skip to content

Commit f4b0c6b

Browse files
committed
identify: Update expect message
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
1 parent 0199557 commit f4b0c6b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/protocol/libp2p/identify.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,10 @@ pub(crate) struct Identify {
194194
impl Identify {
195195
/// Create new [`Identify`] protocol.
196196
pub(crate) fn new(service: TransportService, config: Config) -> Self {
197-
let public = config.public.expect("public key to be supplied");
197+
// The public key is always supplied by litep2p and is the one
198+
// used to identify the local peer. This is a similar story to the
199+
// supported protocols.
200+
let public = config.public.expect("public key to always be supplied by litep2p; qed");
198201
let local_peer_id = public.to_peer_id();
199202

200203
Self {

0 commit comments

Comments
 (0)