From 931e042228d286dfc604f91951316b83fa1734f3 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Mon, 17 Oct 2022 11:04:26 +0100 Subject: [PATCH] fix: enable identify service all the time (#1440) We only enable identify if stream muxers are configured, but new transports can be their own muxers so just enable it all the time. --- src/libp2p.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/libp2p.ts b/src/libp2p.ts index fe42acfd2d..18b878e835 100644 --- a/src/libp2p.ts +++ b/src/libp2p.ts @@ -165,14 +165,11 @@ export class Libp2pNode extends EventEmitter implements Libp2p { this.components.transportManager.add(this.configureComponent(fn(this.components))) }) - // Attach stream multiplexers - if (init.streamMuxers != null && init.streamMuxers.length > 0) { - // Add the identify service since we can multiplex - this.identifyService = new IdentifyService(this.components, { - ...init.identify - }) - this.configureComponent(this.identifyService) - } + // Add the identify service + this.identifyService = new IdentifyService(this.components, { + ...init.identify + }) + this.configureComponent(this.identifyService) // dht provided components (peerRouting, contentRouting, dht) if (init.dht != null) {