From a0bedf6a5b56642b977a70cfb6433e79a5077cc4 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Sat, 14 Oct 2017 16:43:30 -0700 Subject: [PATCH] remove the rest of the supernode code missed in the initial cleanup License: MIT Signed-off-by: Steven Allen --- docs/config.md | 4 ---- misc/completion/ipfs-completion.bash | 2 +- repo/config/config.go | 21 +++++++++--------- repo/config/supernode.go | 33 ---------------------------- 4 files changed, 11 insertions(+), 49 deletions(-) delete mode 100644 repo/config/supernode.go diff --git a/docs/config.md b/docs/config.md index cd9e7a016..f52d503c7 100644 --- a/docs/config.md +++ b/docs/config.md @@ -16,7 +16,6 @@ on a running daemon do not read the config file at runtime. - [`Ipns`](#ipns) - [`Mounts`](#mounts) - [`Reprovider`](#reprovider) -- [`SupernodeRouting`](#supernoderouting) - [`Swarm`](#swarm) ## `Addresses` @@ -242,9 +241,6 @@ Tells reprovider what should be announced. Valid strategies are: - "pinned" - only announce pinned data - "roots" - only announce directly pinned keys and root keys of recursive pins -## `SupernodeRouting` -Deprecated. - ## `Swarm` Options for configuring the swarm. diff --git a/misc/completion/ipfs-completion.bash b/misc/completion/ipfs-completion.bash index 1e6231ef9..27f83fdef 100644 --- a/misc/completion/ipfs-completion.bash +++ b/misc/completion/ipfs-completion.bash @@ -159,7 +159,7 @@ _ipfs_config_show() _ipfs_daemon() { if [[ ${prev} == "--routing" ]] ; then - _ipfs_comp "dht supernode" # TODO: Solve autocomplete bug for "=" + _ipfs_comp "dht dhtclient none" # TODO: Solve autocomplete bug for "=" elif [[ ${prev} == "--mount-ipfs" ]] || [[ ${prev} == "--mount-ipns" ]] || [[ ${prev} == "=" ]]; then _ipfs_filesystem_complete elif [[ ${word} == -* ]] ; then diff --git a/repo/config/config.go b/repo/config/config.go index 3e3c89168..ac7c1152b 100644 --- a/repo/config/config.go +++ b/repo/config/config.go @@ -14,17 +14,16 @@ import ( // Config is used to load ipfs config files. type Config struct { - Identity Identity // local node's peer identity - Datastore Datastore // local node's storage - Addresses Addresses // local node's addresses - Mounts Mounts // local node's mount points - Discovery Discovery // local node's discovery mechanisms - Ipns Ipns // Ipns settings - Bootstrap []string // local nodes's bootstrap peer addresses - Gateway Gateway // local node's gateway server options - SupernodeRouting SupernodeClientConfig // local node's routing servers (if SupernodeRouting enabled) - API API // local node's API settings - Swarm SwarmConfig + Identity Identity // local node's peer identity + Datastore Datastore // local node's storage + Addresses Addresses // local node's addresses + Mounts Mounts // local node's mount points + Discovery Discovery // local node's discovery mechanisms + Ipns Ipns // Ipns settings + Bootstrap []string // local nodes's bootstrap peer addresses + Gateway Gateway // local node's gateway server options + API API // local node's API settings + Swarm SwarmConfig Reprovider Reprovider Experimental Experiments diff --git a/repo/config/supernode.go b/repo/config/supernode.go deleted file mode 100644 index a985040b2..000000000 --- a/repo/config/supernode.go +++ /dev/null @@ -1,33 +0,0 @@ -package config - -import "github.com/ipfs/go-ipfs/thirdparty/ipfsaddr" - -// TODO replace with final servers before merge - -// TODO rename -type SupernodeClientConfig struct { - Servers []string -} - -var DefaultSNRServers = []string{ - "/ip4/104.236.176.52/tcp/4002/ipfs/QmXdb7tWTxdFEQEFgWBqkuYSrZd3mXrC7HxkD4krGNYx2U", - "/ip4/104.236.179.241/tcp/4002/ipfs/QmVRqViDByUxjUMoPnjurjKvZhaEMFDtK35FJXHAM4Lkj6", - "/ip4/104.236.151.122/tcp/4002/ipfs/QmSZwGx8Tn8tmcM4PtDJaMeUQNRhNFdBLVGPzRiNaRJtFH", - "/ip4/162.243.248.213/tcp/4002/ipfs/QmbHVEEepCi7rn7VL7Exxpd2Ci9NNB6ifvqwhsrbRMgQFP", - "/ip4/128.199.219.111/tcp/4002/ipfs/Qmb3brdCYmKG1ycwqCbo6LUwWxTuo3FisnJV2yir7oN92R", - "/ip4/104.236.76.40/tcp/4002/ipfs/QmdRBCV8Cz2dGhoKLkD3YjPwVFECmqADQkx5ZteF2c6Fy4", - "/ip4/178.62.158.247/tcp/4002/ipfs/QmUdiMPci7YoEUBkyFZAh2pAbjqcPr7LezyiPD2artLw3v", - "/ip4/178.62.61.185/tcp/4002/ipfs/QmVw6fGNqBixZE4bewRLT2VXX7fAHUHs8JyidDiJ1P7RUN", -} - -func (gcr *SupernodeClientConfig) ServerIPFSAddrs() ([]ipfsaddr.IPFSAddr, error) { - var addrs []ipfsaddr.IPFSAddr - for _, server := range gcr.Servers { - addr, err := ipfsaddr.ParseString(server) - if err != nil { - return nil, err - } - addrs = append(addrs, addr) - } - return addrs, nil -}