Rename libp2p bootstrap import

To avoid name conflict.
This commit is contained in:
Franck Royer 2022-01-13 16:03:07 +11:00
parent e871da056f
commit f0eb9d1609
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ import { bytes } from '@chainsafe/libp2p-noise/dist/src/@types/basic';
import { Noise } from '@chainsafe/libp2p-noise/dist/src/noise';
import debug from 'debug';
import Libp2p, { Connection, Libp2pModules, Libp2pOptions } from 'libp2p';
import Bootstrap from 'libp2p-bootstrap';
import Libp2pBootstrap from 'libp2p-bootstrap';
import { MuxedStream } from 'libp2p-interfaces/dist/src/stream-muxer/types';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: No types available
@ -195,11 +195,11 @@ export class Waku {
// Note: this overrides any other peer discover
libp2pOpts.modules = Object.assign(libp2pOpts.modules, {
peerDiscovery: [Bootstrap],
peerDiscovery: [Libp2pBootstrap],
});
libp2pOpts.config.peerDiscovery = {
[Bootstrap.tag]: {
[Libp2pBootstrap.tag]: {
list,
enabled: true,
},