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

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-03-27 10:18:40 +03:00 committed by Evgenii Stratonikov
parent 0990a9b0bd
commit fd8cdb9671

View file

@ -18,11 +18,6 @@ func (x Node) PublicKey() []byte {
// and passes them into f. Handler MUST NOT be nil. // and passes them into f. Handler MUST NOT be nil.
func (x Node) IterateAddresses(f func(string) bool) { func (x Node) IterateAddresses(f func(string) bool) {
(netmap.NodeInfo)(x).IterateNetworkEndpoints(f) (netmap.NodeInfo)(x).IterateNetworkEndpoints(f)
for _, addr := range (netmap.NodeInfo)(x).ExternalAddresses() {
if f(addr) {
return
}
}
} }
// NumberOfAddresses returns number of announced network addresses. // NumberOfAddresses returns number of announced network addresses.