mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-06 21:36:26 +00:00
remove unused config variables (#8738)
This commit is contained in:
@@ -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++ {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 }}"
|
||||
|
||||
Reference in New Issue
Block a user