netmap: Do not iterate over external addresses in Node #1057
1 changed files with 0 additions and 5 deletions
|
@ -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.
|
||||||
|
|
Loading…
Reference in a new issue
Could you explain, please, why?
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