[#607] network: Implement WriteToNodeInfo method on Address
Implement `Address.WriteToNodeInfo` method which sets address of `NodeInfo` structure. Use it in storage node application. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
e5504c7130
commit
5de074f24c
3 changed files with 23 additions and 1 deletions
|
@ -73,7 +73,7 @@ func nodeAddressFromNetmap(c *cfg) string {
|
|||
}
|
||||
|
||||
func initNetmapService(c *cfg) {
|
||||
c.cfgNodeInfo.localInfo.SetAddress(c.localAddr.String())
|
||||
c.localAddr.WriteToNodeInfo(&c.cfgNodeInfo.localInfo)
|
||||
c.cfgNodeInfo.localInfo.SetPublicKey(c.key.PublicKey().Bytes())
|
||||
c.cfgNodeInfo.localInfo.SetAttributes(parseAttributes(c.appCfg)...)
|
||||
c.cfgNodeInfo.localInfo.SetState(netmapSDK.NodeStateOffline)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue