From 48cf793a70f754f44c662d839bdde4e191ec2748 Mon Sep 17 00:00:00 2001 From: dabasov Date: Wed, 15 Nov 2023 13:57:47 +0200 Subject: [PATCH] hotfix --- zboxcore/sdk/networkworker.go | 5 +++-- zcncore/networkworker.go | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/zboxcore/sdk/networkworker.go b/zboxcore/sdk/networkworker.go index 276fca806..04c5b40ba 100644 --- a/zboxcore/sdk/networkworker.go +++ b/zboxcore/sdk/networkworker.go @@ -51,7 +51,6 @@ func UpdateNetworkDetails() error { l.Logger.Error("Failed to update network details ", zap.Error(err)) return err } - shouldUpdate := UpdateRequired(networkDetails) if shouldUpdate { forceUpdateNetworkDetails(networkDetails) @@ -87,7 +86,9 @@ func UpdateRequired(networkDetails *Network) bool { if len(miners) == 0 || len(sharders) == 0 { return true } - + if len(networkDetails.Miners) == 0 || len(networkDetails.Sharders) == 0 { + return false + } minerSame := reflect.DeepEqual(miners, networkDetails.Miners) sharderSame := reflect.DeepEqual(sharders, networkDetails.Sharders) diff --git a/zcncore/networkworker.go b/zcncore/networkworker.go index e267c5f4a..0644e45dd 100644 --- a/zcncore/networkworker.go +++ b/zcncore/networkworker.go @@ -82,7 +82,9 @@ func UpdateRequired(networkDetails *Network) bool { if len(miners) == 0 || len(sharders) == 0 { return true } - + if len(networkDetails.Miners) == 0 || len(networkDetails.Sharders) == 0 { + return false + } minerSame := reflect.DeepEqual(miners, networkDetails.Miners) sharderSame := reflect.DeepEqual(sharders, networkDetails.Sharders)