mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-03-07 01:07:44 +08:00
handle testnet
This commit is contained in:
parent
32ed742489
commit
7ca0c9bd37
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user