Skip to content

Commit

Permalink
Updating Node Package struct
Browse files Browse the repository at this point in the history
  • Loading branch information
p-shubh committed Jun 13, 2024
1 parent 06fcb0b commit a78074b
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions util/pkg/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ func CreateNodeStatus(address string, id string, startTimeStamp int64, name stri
if err != nil {
logrus.Error("failed to fetch network speed: ", err.Error())
}
IPGeo := IpGeoAddress{IpInfoIP: core.GlobalIPInfo.IP,
IpGeoAddress := IpGeoAddress{IpInfoIP: core.GlobalIPInfo.IP,
IpInfoCity: core.GlobalIPInfo.City,
IpInfoCountry: core.GlobalIPInfo.Country,
IpInfoLocation: core.GlobalIPInfo.Location,
IpInfoOrg: core.GlobalIPInfo.Org,
IpInfoPostal: core.GlobalIPInfo.Postal,
IpInfoTimezone: core.GlobalIPInfo.Timezone}
fmt.Println("Ip Geo : ", IPGeo)
fmt.Println("Ip Geo : ", IpGeoAddress)
nodeStatus := &NodeStatus{
HttpPort: os.Getenv("HTTP_PORT"),
Host: os.Getenv("DOMAIN"),
Expand All @@ -138,18 +138,11 @@ func CreateNodeStatus(address string, id string, startTimeStamp int64, name stri
Name: name,
WalletAddress: core.WalletAddress,
Chain: os.Getenv("CHAIN_NAME"),
// IpInfoIP: core.GlobalIPInfo.IP,
// IpInfoCity: core.GlobalIPInfo.City,
// IpInfoCountry: core.GlobalIPInfo.Country,
// IpInfoLocation: core.GlobalIPInfo.Location,
// IpInfoOrg: core.GlobalIPInfo.Org,
// IpInfoPostal: core.GlobalIPInfo.Postal,
// IpInfoTimezone: core.GlobalIPInfo.Timezone,
IpGeoData: ToJSON(IPGeo),
Version: "v1",
CodeHash: "yyyyyyyyyyyyyyyyyy",
SystemInfo: ToJSON(GetOSInfo()),
IpInfo: ToJSON(GetIPInfo()),
Version: "v1",
CodeHash: "xxxxxxxxxxxxx",
SystemInfo: ToJSON(GetOSInfo()),
IpInfo: ToJSON(GetIPInfo()),
IpGeoData: ToJSON(IpGeoAddress),
}

return nodeStatus
Expand Down

0 comments on commit a78074b

Please sign in to comment.