diff --git a/apps/networkmonitor/networkmonitor.nim b/apps/networkmonitor/networkmonitor.nim index 2861c85ae..e61cf2bf2 100644 --- a/apps/networkmonitor/networkmonitor.nim +++ b/apps/networkmonitor/networkmonitor.nim @@ -568,7 +568,7 @@ when isMainModule: info "cli flags", conf = conf if conf.clusterId == 1: - let twnClusterConf = ClusterConf.TheWakuNetworkConf() + let twnClusterConf = NetworkConfig.TheWakuNetworkConf() conf.bootstrapNodes = twnClusterConf.discv5BootstrapNodes conf.rlnRelayDynamic = twnClusterConf.rlnRelayDynamic diff --git a/examples/wakustealthcommitments/node_spec.nim b/examples/wakustealthcommitments/node_spec.nim index dbab8a3b2..42ea0b40e 100644 --- a/examples/wakustealthcommitments/node_spec.nim +++ b/examples/wakustealthcommitments/node_spec.nim @@ -25,7 +25,7 @@ proc setup*(): Waku = var conf = confRes.get() - let twnClusterConf = ClusterConf.TheWakuNetworkConf() + let twnClusterConf = NetworkConfig.TheWakuNetworkConf() if len(conf.shards) != 0: conf.pubsubTopics = conf.shards.mapIt(twnClusterConf.pubsubTopics[it.uint16]) else: diff --git a/tests/factory/test_config.nim b/tests/factory/test_config.nim index 1d8bf6e37..f2115d9ca 100644 --- a/tests/factory/test_config.nim +++ b/tests/factory/test_config.nim @@ -18,7 +18,7 @@ import suite "Waku config - apply preset": test "Default preset is TWN": ## Setup - let expectedConf = ClusterConf.TheWakuNetworkConf() + let expectedConf = NetworkConfig.TheWakuNetworkConf() ## Given let preConfig = WakuNodeConf(cmd: noCommand, preset: "twn") @@ -43,7 +43,7 @@ suite "Waku config - apply preset": test "Subscribes to all valid shards in twn": ## Setup - let expectedConf = ClusterConf.TheWakuNetworkConf() + let expectedConf = NetworkConfig.TheWakuNetworkConf() ## Given let shards: seq[uint16] = @[0, 1, 2, 3, 4, 5, 6, 7] @@ -59,7 +59,7 @@ suite "Waku config - apply preset": test "Subscribes to some valid shards in twn": ## Setup - let expectedConf = ClusterConf.TheWakuNetworkConf() + let expectedConf = NetworkConfig.TheWakuNetworkConf() ## Given let shards: seq[uint16] = @[0, 4, 7] diff --git a/waku/factory/internal_config.nim b/waku/factory/internal_config.nim index 08f11f1c5..3c908bacb 100644 --- a/waku/factory/internal_config.nim +++ b/waku/factory/internal_config.nim @@ -170,7 +170,7 @@ proc applyPresetConfiguration*(srcConf: WakuNodeConf): Result[WakuNodeConf, stri case toLowerAscii(resConf.preset) of "twn": - let twnClusterConf = ClusterConf.TheWakuNetworkConf() + let twnClusterConf = NetworkConfig.TheWakuNetworkConf() # Override configuration resConf.maxMessageSize = twnClusterConf.maxMessageSize diff --git a/waku/factory/networks_config.nim b/waku/factory/networks_config.nim index 01e4cf19e..3ed498a6a 100644 --- a/waku/factory/networks_config.nim +++ b/waku/factory/networks_config.nim @@ -1,6 +1,6 @@ {.push raises: [].} -type ClusterConf* = object +type NetworkConfig* = object maxMessageSize*: string clusterId*: uint16 rlnRelay*: bool @@ -17,8 +17,8 @@ type ClusterConf* = object # cluster-id=1 (aka The Waku Network) # Cluster configuration corresponding to The Waku Network. Note that it # overrides existing cli configuration -proc TheWakuNetworkConf*(T: type ClusterConf): ClusterConf = - return ClusterConf( +proc TheWakuNetworkConf*(T: type NetworkConfig): NetworkConfig = + return NetworkConfig( maxMessageSize: "150KiB", clusterId: 1, rlnRelay: true,