chore(node_config): move constants to NODE_CONFIG

This commit is contained in:
Patryk Osmaczko 2023-02-27 11:06:13 +01:00 committed by osmaczko
parent 4d5d557dfd
commit 489d5d501d
2 changed files with 6 additions and 12 deletions

View File

@ -280,11 +280,11 @@ var NODE_CONFIG* = %* {
}, },
"Name": "StatusDesktop", "Name": "StatusDesktop",
"NetworkId": 1, "NetworkId": 1,
"NoDiscovery": false, "NoDiscovery": true,
"PermissionsConfig": { "PermissionsConfig": {
"Enabled": true "Enabled": true
}, },
"Rendezvous": true, "Rendezvous": false,
"RegisterTopics": @["whispermail"], "RegisterTopics": @["whispermail"],
"RequireTopics": { "RequireTopics": {
"whisper": { "whisper": {
@ -319,21 +319,24 @@ var NODE_CONFIG* = %* {
"URL": "https://mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED "URL": "https://mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED
}, },
"WakuConfig": { "WakuConfig": {
"Enabled": false,
"BloomFilterMode": true, "BloomFilterMode": true,
"Enabled": true, "Enabled": true,
"LightClient": true, "LightClient": true,
"MinimumPoW": 0.001 "MinimumPoW": 0.001
}, },
"WakuV2Config": { "WakuV2Config": {
"Enabled": false, "Enabled": true,
"Host": "0.0.0.0", "Host": "0.0.0.0",
"Port": WAKU_V2_PORT, "Port": WAKU_V2_PORT,
"LightClient": false, "LightClient": false,
"PersistPeers": true, "PersistPeers": true,
"EnableDiscV5": true, "EnableDiscV5": true,
"DiscoveryLimit": 20,
"UDPPort": WAKU_V2_PORT, "UDPPort": WAKU_V2_PORT,
"PeerExchange": true, "PeerExchange": true,
"AutoUpdate": true, "AutoUpdate": true,
"Rendezvous": true,
}, },
"WalletConfig": { "WalletConfig": {
"Enabled": true, "Enabled": true,

View File

@ -320,21 +320,12 @@ QtObject:
result["UpstreamConfig"]["Enabled"] = true.newJBool() result["UpstreamConfig"]["Enabled"] = true.newJBool()
result["UpstreamConfig"]["URL"] = NETWORKS[0]{"rpcUrl"} result["UpstreamConfig"]["URL"] = NETWORKS[0]{"rpcUrl"}
result["ShhextConfig"]["InstallationID"] = newJString(installationId) result["ShhextConfig"]["InstallationID"] = newJString(installationId)
result["NoDiscovery"] = true.newJBool()
result["Rendezvous"] = false.newJBool()
# TODO: fleet.status.im should have different sections depending on the node type # TODO: fleet.status.im should have different sections depending on the node type
# or maybe it's not necessary because a node has the identify protocol # or maybe it's not necessary because a node has the identify protocol
result["ClusterConfig"]["WakuNodes"] = %* dnsDiscoveryURL result["ClusterConfig"]["WakuNodes"] = %* dnsDiscoveryURL
result["ClusterConfig"]["DiscV5BootstrapNodes"] = %* dnsDiscoveryURL result["ClusterConfig"]["DiscV5BootstrapNodes"] = %* dnsDiscoveryURL
result["WakuV2Config"]["EnableDiscV5"] = true.newJBool()
result["WakuV2Config"]["DiscoveryLimit"] = 20.newJInt()
result["WakuV2Config"]["Rendezvous"] = true.newJBool()
result["WakuV2Config"]["Enabled"] = true.newJBool()
result["WakuConfig"]["Enabled"] = false.newJBool()
if TEST_PEER_ENR != "": if TEST_PEER_ENR != "":
let testPeerENRArr = %* @[TEST_PEER_ENR] let testPeerENRArr = %* @[TEST_PEER_ENR]
result["ClusterConfig"]["WakuNodes"] = %* testPeerENRArr result["ClusterConfig"]["WakuNodes"] = %* testPeerENRArr