Răsfoiți Sursa

example/dchat/dchatd: DEP-0007: add network profiles to net setting section of the toml configs

oars 1 an în urmă
părinte
comite
1c9391b0b6

+ 7 - 3
example/dchat/dchatd/dchatd_config.toml

@@ -9,6 +9,13 @@ rpc_listen = "tcp://127.0.0.1:51054"
 #rpc_disabled_methods = ["p2p.get_info"]
 
 [net]
+## Outbound connect slots. Required for outbound nodes.
+outbound_connections = 5
+
+# Whitelisted network transports for outbound connections
+active_profiles = ["tcp"]
+
+[net.profiles."tcp"]
 ## P2P accept addresses Required for inbound nodes.
 #inbound=["tcp://127.0.0.1:51554"]
 
@@ -17,6 +24,3 @@ rpc_listen = "tcp://127.0.0.1:51054"
 
 ## Seed nodes to connect to. Required for inbound and outbound nodes.
 seeds=["tcp://127.0.0.1:50515"]
-
-## Outbound connect slots. Required for outbound nodes.
-outbound_connections = 5

+ 5 - 4
example/dchat/dchatd/example/node1.toml

@@ -3,11 +3,12 @@ verbose = 2
 
 [net]
 hostlist = "example/node1.tsv"
-inbound = ["tcp://[::]:10202"]
-allowed_transports = ["tcp"]
-external_addrs = ["tcp://[::]:10202"]
-seeds = ["tcp://[::1]:10200"]
 outbound_connections = 5
 magic_bytes = [127, 64, 12, 201]
 localnet = true
+active_profiles = ["tcp"]
 
+[net.profiles."tcp"]
+inbound = ["tcp://[::]:10202"]
+external_addrs = ["tcp://[::]:10202"]
+seeds = ["tcp://[::1]:10200"]

+ 5 - 4
example/dchat/dchatd/example/node2.toml

@@ -3,11 +3,12 @@ verbose = 2
 
 [net]
 hostlist = "example/node2.tsv"
-inbound = ["tcp://[::]:10201"]
-allowed_transports = ["tcp"]
-external_addrs=["tcp://[::1]:10201"]
-seeds = ["tcp://[::1]:10200"]
 outbound_connections = 5
 magic_bytes = [127, 64, 12, 201]
 localnet = true
+active_profiles = ["tcp"]
 
+[net.profiles."tcp"]
+inbound = ["tcp://[::]:10201"]
+external_addrs=["tcp://[::1]:10201"]
+seeds = ["tcp://[::1]:10200"]

+ 5 - 4
example/dchat/dchatd/example/seed.toml

@@ -3,10 +3,11 @@ verbose = 2
 
 [net]
 hostlist = "example/seed.tsv"
-inbound=["tcp://[::]:10200"]
-allowed_transports = ["tcp"]
-seeds=[]
-# no outbounds for seed node
 magic_bytes=[127, 64, 12, 201]
 localnet = true
+active_profiles = ["tcp"]
 
+[net.profiles."tcp"]
+inbound=["tcp://[::]:10200"]
+seeds=[]
+# no outbounds for seed node