Skip to content

Commit

Permalink
Merge pull request #4302 from ipfs/fix/3950
Browse files Browse the repository at this point in the history
remove supernode routing
  • Loading branch information
whyrusleeping authored Oct 14, 2017
2 parents 9c06a0e + 93f3117 commit 786d81e
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 1,133 deletions.
19 changes: 2 additions & 17 deletions cmd/ipfs/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ import (
commands "github.com/ipfs/go-ipfs/core/commands"
corehttp "github.com/ipfs/go-ipfs/core/corehttp"
corerepo "github.com/ipfs/go-ipfs/core/corerepo"
"github.com/ipfs/go-ipfs/core/corerouting"
nodeMount "github.com/ipfs/go-ipfs/fuse/node"
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"
migrate "github.com/ipfs/go-ipfs/repo/fsrepo/migrations"

pstore "gx/ipfs/QmPgDWmTmuzvP7QE5zwo1TmjbJme9pmZHNujB2453jkCTr/go-libp2p-peerstore"
mprome "gx/ipfs/QmSk46nSD78YiuNojYMS8NW6hSCjH95JajqqzzoychZgef/go-metrics-prometheus"
"gx/ipfs/QmX3QZ5jHEPidwUrymXV1iSCSUhdGxj15sm2gP4jKMef7B/client_golang/prometheus"
"gx/ipfs/QmX3U3YXCQ6UYBxq2LVWF8dARS1hPUTEYLrSx654Qyxyw6/go-multiaddr-net"
Expand Down Expand Up @@ -304,21 +302,8 @@ func daemonFunc(req cmds.Request, res cmds.Response) {
}
switch routingOption {
case routingOptionSupernodeKwd:
servers, err := cfg.SupernodeRouting.ServerIPFSAddrs()
if err != nil {
res.SetError(err, cmds.ErrNormal)
repo.Close() // because ownership hasn't been transferred to the node
return
}
var infos []pstore.PeerInfo
for _, addr := range servers {
infos = append(infos, pstore.PeerInfo{
ID: addr.ID(),
Addrs: []ma.Multiaddr{addr.Transport()},
})
}

ncfg.Routing = corerouting.SupernodeClient(infos...)
res.SetError(errors.New("supernode routing was never fully implemented and has been removed"), cmds.ErrNormal)
return
case routingOptionDHTClientKwd:
ncfg.Routing = core.DHTClientOption
case routingOptionDHTKwd:
Expand Down
52 changes: 0 additions & 52 deletions core/corerouting/core.go

This file was deleted.

164 changes: 0 additions & 164 deletions routing/supernode/client.go

This file was deleted.

59 changes: 0 additions & 59 deletions routing/supernode/proxy/loopback.go

This file was deleted.

Loading

0 comments on commit 786d81e

Please sign in to comment.