From 022193fe8f37c9bb4c9838125540d19b8166e931 Mon Sep 17 00:00:00 2001 From: Stefan D Date: Wed, 16 Mar 2022 12:20:50 +0100 Subject: [PATCH] fix(node): enable bandwith reporting in node view Add entry to services.nim in oder to upgrade existing user config that are missing this value fixes #4990 --- resources/node-config.json | 3 ++- src/app_service/common/network_constants.nim | 5 +++-- src/app_service/service/accounts/service.nim | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/resources/node-config.json b/resources/node-config.json index 55a7d733e2..9db96687db 100644 --- a/resources/node-config.json +++ b/resources/node-config.json @@ -38,7 +38,8 @@ "VerifyENSContractAddress": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", "VerifyENSURL": "https://mainnet.infura.io/v3/%INFURA_KEY%", "VerifyTransactionChainID": 1, - "VerifyTransactionURL": "https://mainnet.infura.io/v3/%INFURA_KEY%" + "VerifyTransactionURL": "https://mainnet.infura.io/v3/%INFURA_KEY%", + "BandwidthStatsEnabled": true }, "StatusAccountsConfig": { "Enabled": true diff --git a/src/app_service/common/network_constants.nim b/src/app_service/common/network_constants.nim index 350cfdb572..1cabacd030 100644 --- a/src/app_service/common/network_constants.nim +++ b/src/app_service/common/network_constants.nim @@ -147,7 +147,8 @@ var NODE_CONFIG* = %* { "VerifyENSContractAddress": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", "VerifyENSURL": "https://mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED, "VerifyTransactionChainID": 1, - "VerifyTransactionURL": "https://mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED + "VerifyTransactionURL": "https://mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED, + "BandwidthStatsEnabled": true }, "Web3ProviderConfig": { "Enabled": true @@ -162,7 +163,7 @@ var NODE_CONFIG* = %* { "Enabled": true, "URL": "https://mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED }, - "WakuConfig": { + "WakuConfig": { "BloomFilterMode": true, "Enabled": true, "LightClient": true, diff --git a/src/app_service/service/accounts/service.nim b/src/app_service/service/accounts/service.nim index f26052f457..4164779eb2 100644 --- a/src/app_service/service/accounts/service.nim +++ b/src/app_service/service/accounts/service.nim @@ -311,6 +311,9 @@ proc login*(self: Service, account: AccountDto, password: string): string = # While this is fixed, you can add here any missing attribute on the node config, and it will be merged with whatever # the account has in the db var nodeCfg = %* { + "ShhextConfig": %* { + "BandwidthStatsEnabled": true + }, "Web3ProviderConfig": %* { "Enabled": true },