cmd/storagenode: use contact address instead of server address
Currently the address being used is most of the time just :28967, which is not the correct address to reach the node from the public on. This change uses the designated contact external address value that contains the set and preferred way to reach the node. Change-Id: I99e979c2541043755b81e65c36c4289bfa3f60f3
This commit is contained in:
parent
eb0d08d59b
commit
44a73b01d9
@ -389,7 +389,7 @@ func cmdInfo(cmd *cobra.Command, args []string) (err error) {
|
||||
node := nodes.Node{
|
||||
ID: identity.ID,
|
||||
APISecret: apiKey.Secret[:],
|
||||
PublicAddress: nodeInfoCfg.Server.Address,
|
||||
PublicAddress: nodeInfoCfg.Contact.ExternalAddress,
|
||||
}
|
||||
|
||||
data, err := json.Marshal(node)
|
||||
@ -405,7 +405,7 @@ func cmdInfo(cmd *cobra.Command, args []string) (err error) {
|
||||
ID: %s
|
||||
API Secret: %s
|
||||
Public Address: %s
|
||||
`, identity.ID, apiKey.Secret, nodeInfoCfg.Server.Address)
|
||||
`, identity.ID, apiKey.Secret, nodeInfoCfg.Contact.ExternalAddress)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user