Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pschork committed May 11, 2024
1 parent d0febd9 commit 4d26766
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,9 @@ func (n *Node) checkCurrentNodeIp(ctx context.Context) {
}
}

// OperatorReachabilityResponse is the response object for the reachability check
type OperatorReachabilityResponse struct {
OperatorId string `json:"operator_id"`
OperatorID string `json:"operator_id"`
DispersalSocket string `json:"dispersal_socket"`
RetrievalSocket string `json:"retrieval_socket"`
DispersalOnline bool `json:"dispersal_online"`
Expand Down Expand Up @@ -511,7 +512,10 @@ func (n *Node) checkNodeReachability() {
}

var responseObject OperatorReachabilityResponse
json.Unmarshal(data, &responseObject)
err = json.Unmarshal(data, &responseObject)
if err != nil {
n.Logger.Error("Reachability check failed to unmarshal json responmse", err)
}
if responseObject.DispersalOnline {
n.Logger.Info("Reachability check - dispersal socket is ONLINE", "socket", responseObject.DispersalSocket)
} else {
Expand Down

0 comments on commit 4d26766

Please sign in to comment.