change max conn per IP default to 10

pull/3904/head
yahtoo 3 years ago
parent aae369babc
commit c950b30644
  1. 2
      cmd/bootnode/main.go
  2. 4
      cmd/harmony/flags_test.go
  3. 2
      internal/configs/node/network.go

@ -100,7 +100,7 @@ func main() {
versionFlag := flag.Bool("version", false, "Output version info")
verbosity := flag.Int("verbosity", 5, "Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail (default: 5)")
logConn := flag.Bool("log_conn", false, "log incoming/outgoing connections")
maxConnPerIP := flag.Int("max_conn_per_ip", 2, "max connections number for same ip")
maxConnPerIP := flag.Int("max_conn_per_ip", 10, "max connections number for same ip")
flag.Parse()

@ -369,7 +369,7 @@ func TestP2PFlags(t *testing.T) {
IP: nodeconfig.DefaultPublicListenIP,
KeyFile: "./key.file",
DHTDataStore: &defDataStore,
MaxConnsPerIP: 2,
MaxConnsPerIP: 10,
},
},
{
@ -378,7 +378,7 @@ func TestP2PFlags(t *testing.T) {
Port: 9001,
IP: nodeconfig.DefaultPublicListenIP,
KeyFile: "./key.file",
MaxConnsPerIP: 2,
MaxConnsPerIP: 10,
},
},
{

@ -58,7 +58,7 @@ const (
DefaultPrometheusPort = 9900
// DefaultP2PConcurrency is the default P2P concurrency, 0 means is set the default value of P2P Discovery, the actual value is 10
DefaultP2PConcurrency = 0
DefaultMaxConnPerIP = 2
DefaultMaxConnPerIP = 10
)
const (

Loading…
Cancel
Save