[#603] cmd/node: Separate configuration and netmap node info
Config `NodeInfo` should be used for bootstrap. Separete local node info and netmap one. Return configured `NodeInfo` if structure from netmap is missing. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
5a4c3dfddf
commit
6279b6343f
4 changed files with 60 additions and 84 deletions
|
@ -365,25 +365,19 @@ type usedSpaceService struct {
|
|||
}
|
||||
|
||||
func (c *cfg) PublicKey() []byte {
|
||||
ni := c.localNodeInfo()
|
||||
return ni.PublicKey()
|
||||
return nodeKeyFromNetmap(c)
|
||||
}
|
||||
|
||||
func (c *cfg) Address() string {
|
||||
ni := c.localNodeInfo()
|
||||
return ni.Address()
|
||||
return nodeAddressFromNetmap(c)
|
||||
}
|
||||
|
||||
func (c *usedSpaceService) PublicKey() []byte {
|
||||
ni := c.cfg.localNodeInfo()
|
||||
|
||||
return ni.PublicKey()
|
||||
return nodeKeyFromNetmap(c.cfg)
|
||||
}
|
||||
|
||||
func (c *usedSpaceService) Address() string {
|
||||
ni := c.cfg.localNodeInfo()
|
||||
|
||||
return ni.Address()
|
||||
return nodeAddressFromNetmap(c.cfg)
|
||||
}
|
||||
|
||||
func (c *usedSpaceService) AnnounceUsedSpace(ctx context.Context, req *containerV2.AnnounceUsedSpaceRequest) (*containerV2.AnnounceUsedSpaceResponse, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue