diff --git a/cmd/tendermint/commands/testnet.go b/cmd/tendermint/commands/testnet.go index 82c8cc6f9..5ba76621c 100644 --- a/cmd/tendermint/commands/testnet.go +++ b/cmd/tendermint/commands/testnet.go @@ -239,7 +239,6 @@ Example: for i := 0; i < nValidators+nNonValidators; i++ { nodeDir := filepath.Join(outputDir, fmt.Sprintf("%s%d", nodeDirPrefix, i)) config.SetRoot(nodeDir) - config.P2P.AllowDuplicateIP = true if populatePersistentPeers { persistentPeersWithoutSelf := make([]string, 0) for j := 0; j < len(persistentPeers); j++ { diff --git a/config/config.go b/config/config.go index 43b3fc10f..d875b8569 100644 --- a/config/config.go +++ b/config/config.go @@ -638,9 +638,6 @@ type P2PConfig struct { //nolint: maligned // other peers) PrivatePeerIDs string `mapstructure:"private-peer-ids"` - // Toggle to disable guard against peers connecting from the same ip. - AllowDuplicateIP bool `mapstructure:"allow-duplicate-ip"` - // Time to wait before flushing messages out on the connection FlushThrottleTimeout time.Duration `mapstructure:"flush-throttle-timeout"` @@ -657,10 +654,6 @@ type P2PConfig struct { //nolint: maligned HandshakeTimeout time.Duration `mapstructure:"handshake-timeout"` DialTimeout time.Duration `mapstructure:"dial-timeout"` - // Testing params. - // Force dial to fail - TestDialFail bool `mapstructure:"test-dial-fail"` - // Makes it possible to configure which queue backend the p2p // layer uses. Options are: "fifo" and "priority", // with the default being "priority". @@ -685,10 +678,8 @@ func DefaultP2PConfig() *P2PConfig { SendRate: 5120000, // 5 mB/s RecvRate: 5120000, // 5 mB/s PexReactor: true, - AllowDuplicateIP: false, HandshakeTimeout: 20 * time.Second, DialTimeout: 3 * time.Second, - TestDialFail: false, QueueType: "priority", } } @@ -715,7 +706,6 @@ func (cfg *P2PConfig) ValidateBasic() error { func TestP2PConfig() *P2PConfig { cfg := DefaultP2PConfig() cfg.ListenAddress = "tcp://127.0.0.1:36656" - cfg.AllowDuplicateIP = true cfg.FlushThrottleTimeout = 10 * time.Millisecond return cfg } diff --git a/config/toml.go b/config/toml.go index 4db4f4e65..cf6635d45 100644 --- a/config/toml.go +++ b/config/toml.go @@ -319,9 +319,6 @@ pex = {{ .P2P.PexReactor }} # Warning: IPs will be exposed at /net_info, for more information https://github.com/tendermint/tendermint/issues/3055 private-peer-ids = "{{ .P2P.PrivatePeerIDs }}" -# Toggle to disable guard against peers connecting from the same ip. -allow-duplicate-ip = {{ .P2P.AllowDuplicateIP }} - # Peer connection configuration. handshake-timeout = "{{ .P2P.HandshakeTimeout }}" dial-timeout = "{{ .P2P.DialTimeout }}"