Эх сурвалжийг харах

settings: set inbound/ outbound default to 8, white_connect_percent to 70

Also propgagate this change as the default to various configs.
draoi 2 жил өмнө
parent
commit
15b7bc4bd8

+ 7 - 1
bin/darkfid/darkfid_config.toml

@@ -77,7 +77,13 @@ inbound = ["tcp+tls://0.0.0.0:8242"]
 
 # Inbound connections slots number, this many active inbound connections
 # will be allowed. (This does not include manual or outbound connections)
-#inbound_connections = 0
+#inbound_connections = 8
+
+## White connection percent
+# gold_connect_count = 2
+
+## White connection percent
+# white_connect_percent = 70
 
 # Manual connections retry limit, 0 for forever looping
 #manual_attempt_limit = 0

+ 8 - 2
bin/darkirc/darkirc_config.toml

@@ -44,10 +44,16 @@ hostlist = "~/.local/darkfi/darkirc/hostlist.tsv"
 #inbound = ["tcp+tls://0.0.0.0:26661", "tcp+tls://[::]:26661"]
 
 ## Outbound connection slots
-outbound_connections = 8
+# outbound_connections = 8
 
 ## Inbound connection slots
-#inbound_connections = 0
+#inbound_connections = 8
+
+## White connection percent
+# gold_connect_count = 2
+
+## White connection percent
+# white_connect_percent = 70
 
 ## Addresses we want to advertise to peers (optional)
 ## These should be reachable externally

+ 8 - 2
bin/tau/taud/taud_config.toml

@@ -22,10 +22,16 @@ hostlist = "~/.local/darkfi/darkirc/hostlist.tsv"
 #inbound = ["tcp+tls://0.0.0.0:23331", "tcp+tls://[::]:23331"]
 
 ## Outbound connection slots
-outbound_connections = 8
+# outbound_connections = 8
 
 ## Inbound connection slots
-inbound_connections = 0
+#inbound_connections = 8
+
+## White connection percent
+# gold_connect_count = 2
+
+## White connection percent
+# white_connect_percent = 70
 
 ## Addresses we want to advertise to peers (optional)
 ## These should be reachable externally

+ 3 - 3
src/net/settings.rs

@@ -94,8 +94,8 @@ impl Default for Settings {
             app_version,
             allowed_transports: vec!["tcp+tls".to_string()],
             transport_mixing: true,
-            outbound_connections: 0,
-            inbound_connections: 10,
+            outbound_connections: 8,
+            inbound_connections: 8,
             outbound_connect_timeout: 15,
             channel_handshake_timeout: 10,
             channel_heartbeat_interval: 30,
@@ -104,7 +104,7 @@ impl Default for Settings {
             outbound_peer_discovery_attempt_time: 5,
             hostlist: "/dev/null".to_string(),
             greylist_refinery_interval: 15,
-            white_connect_percent: 90,
+            white_connect_percent: 70,
             gold_connect_count: 2,
             time_with_no_connections: 30,
             blacklist: vec![],