Skip to content

Commit

Permalink
update: add bootstrap to kad
Browse files Browse the repository at this point in the history
  • Loading branch information
yxq authored and 33cn committed Aug 3, 2021
1 parent f188362 commit 8542f6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/p2p/dht/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func InitDhtDiscovery(ctx context.Context, host host.Host, peersInfo []peer.Addr
//如果不修改DHTProto 则有可能会连入IPFS网络,dhtproto=/ipfs/kad/1.0.0
d := new(Discovery)

kademliaDHT, err := dht.New(ctx, host, dht.V1ProtocolOverride(protocol.ID(fmt.Sprintf(dhtProtoID, chainCfg.GetTitle(), subCfg.Channel))))
kademliaDHT, err := dht.New(ctx, host, dht.V1ProtocolOverride(protocol.ID(fmt.Sprintf(dhtProtoID, chainCfg.GetTitle(), subCfg.Channel))), dht.BootstrapPeers(peersInfo...), dht.DisableAutoRefresh())
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 8542f6d

Please sign in to comment.