mirror of
https://github.com/ipfs/kubo.git
synced 2025-08-06 11:31:54 +08:00
feat(gcr/c) add support for multiple servers
This commit is contained in:
@ -70,7 +70,11 @@ func GrandCentralClient(remotes ...peer.PeerInfo) core.RoutingOption {
|
||||
// TODO right now, I think this has a hidden dependency on the
|
||||
// bootstrap peers provided to the core.Node. Careful...
|
||||
|
||||
proxy := gcproxy.Standard(node.PeerHost, remotes[0].ID) // TODO support more than one
|
||||
var ids []peer.ID
|
||||
for _, info := range remotes {
|
||||
ids = append(ids, info.ID)
|
||||
}
|
||||
proxy := gcproxy.Standard(node.PeerHost, ids)
|
||||
return grandcentral.NewClient(proxy, node.Peerstore, node.Identity)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user