We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0199557 commit f4b0c6bCopy full SHA for f4b0c6b
src/protocol/libp2p/identify.rs
@@ -194,7 +194,10 @@ pub(crate) struct Identify {
194
impl Identify {
195
/// Create new [`Identify`] protocol.
196
pub(crate) fn new(service: TransportService, config: Config) -> Self {
197
- let public = config.public.expect("public key to be supplied");
+ // 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");
201
let local_peer_id = public.to_peer_id();
202
203
Self {
0 commit comments