netmap: Do not iterate over external addresses in Node #1057

Merged
fyrchik merged 1 commit from fyrchik/frostfs-node:fix-external-addr into master 2024-03-29 20:46:25 +00:00

View file

@ -18,11 +18,6 @@ func (x Node) PublicKey() []byte {
// and passes them into f. Handler MUST NOT be nil.
func (x Node) IterateAddresses(f func(string) bool) {
(netmap.NodeInfo)(x).IterateNetworkEndpoints(f)
for _, addr := range (netmap.NodeInfo)(x).ExternalAddresses() {
Review

Could you explain, please, why?

Could you explain, please, why?
Review

This wrapper still contains ExternalAddresses field, which is used in places where we need them.
In IterateAddresses only internal are expected.
Though, this line was here from the initial implementation

This wrapper still contains `ExternalAddresses` field, which is used in places where we need them. In `IterateAddresses` only internal are expected. Though, this line was here from the initial implementation
if f(addr) {
return
}
}
}
// NumberOfAddresses returns number of announced network addresses.