Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
dabasov committed Nov 15, 2023
1 parent 895c7f0 commit 48cf793
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions zboxcore/sdk/networkworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down
4 changes: 3 additions & 1 deletion zcncore/networkworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 48cf793

Please sign in to comment.