Commit b4463d2c authored by Jeromy Johnson's avatar Jeromy Johnson Committed by GitHub

Merge pull request #4307 from ipfs/fix/remove-rest-of-supernode

remove the rest of the supernode code
parents 786d81ed 603ecf62
......@@ -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.
......
......@@ -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
......
......@@ -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
......
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
}
......@@ -49,4 +49,13 @@ test_expect_success 'output contains info about dht option' '
test_fsh cat daemon_output
'
test_expect_success 'daemon should not start with supernode dht opt' '
test_must_fail ipfs daemon --routing=supernode > daemon_output2 2>&1
'
test_expect_success 'output contains info about supernode dht option' '
grep "supernode routing was never fully implemented" daemon_output2 ||
test_fsh cat daemon_output2
'
test_done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment