[#1057] netmap: Do not iterate over external addresses in Node
All checks were successful
DCO action / DCO (pull_request) Successful in 10m58s
Tests and linters / Lint (pull_request) Successful in 11m59s
Vulncheck / Vulncheck (pull_request) Successful in 12m58s
Build / Build Components (1.21) (pull_request) Successful in 13m56s
Build / Build Components (1.20) (pull_request) Successful in 14m40s
Tests and linters / gopls check (pull_request) Successful in 15m40s
Tests and linters / Staticcheck (pull_request) Successful in 16m18s
Tests and linters / Tests with -race (pull_request) Successful in 17m39s
Tests and linters / Tests (1.20) (pull_request) Successful in 3m8s
Tests and linters / Tests (1.21) (pull_request) Successful in 3m7s

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

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.