From 10cf2862086630625434f8b2239227dee7440858 Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Tue, 18 Jun 2024 14:36:53 +0100 Subject: [PATCH] feat_: added Login request BandwidthStatsEnabled flag (#5369) --- api/geth_backend.go | 2 ++ protocol/requests/login.go | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/api/geth_backend.go b/api/geth_backend.go index e0e1061d1..47fe42665 100644 --- a/api/geth_backend.go +++ b/api/geth_backend.go @@ -644,6 +644,8 @@ func (b *GethStatusBackend) loginAccount(request *requests.Login) error { b.config.WakuV2Config.Nameserver = request.WakuV2Nameserver } + b.config.ShhextConfig.BandwidthStatsEnabled = request.BandwidthStatsEnabled + b.overrideNetworks(b.config, request) err = b.setupLogSettings() diff --git a/protocol/requests/login.go b/protocol/requests/login.go index 4c895c0fa..13441fc98 100644 --- a/protocol/requests/login.go +++ b/protocol/requests/login.go @@ -8,9 +8,10 @@ type Login struct { Password string `json:"password"` KeyUID string `json:"keyUid"` - KdfIterations int `json:"kdfIterations"` - RuntimeLogLevel string `json:"runtimeLogLevel"` - WakuV2Nameserver string `json:"wakuV2Nameserver"` + KdfIterations int `json:"kdfIterations"` + RuntimeLogLevel string `json:"runtimeLogLevel"` + WakuV2Nameserver string `json:"wakuV2Nameserver"` + BandwidthStatsEnabled bool `json:"bandwidthStatsEnabled"` WalletSecretsConfig }