diff --git a/node/p2p/blossomsub.go b/node/p2p/blossomsub.go index 4266228..a82020f 100644 --- a/node/p2p/blossomsub.go +++ b/node/p2p/blossomsub.go @@ -724,11 +724,17 @@ func initDHT( } else { mode = dht.ModeClient } + opts := []dht.Option{ + dht.Mode(mode), + dht.BootstrapPeers(bootstrappers...), + } + if network != 0 { + opts = append(opts, dht.ProtocolPrefix(protocol.ID("/testnet"))) + } kademliaDHT, err := dht.New( ctx, h, - dht.Mode(mode), - dht.BootstrapPeers(bootstrappers...), + opts..., ) if err != nil { panic(err)