forked from TrueCloudLab/frostfs-node
[#2156] core/netmap: Change node addresses iteration order
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
a68ff67ed8
commit
0244f2e5ce
2 changed files with 2 additions and 1 deletions
|
@ -56,6 +56,7 @@ Changelog for NeoFS Node
|
|||
- Panic in `GETRANGE` with zero length (#2095)
|
||||
- Spawning useless `GETRANGE` with zero length for a big object (#2101)
|
||||
- Incomplete object put errors do contain the deepest error's message (#2092)
|
||||
- Prioritize internal addresses for clients (#2156)
|
||||
|
||||
### Removed
|
||||
- `-g` option from `neofs-cli control ...` and `neofs-cli container create` commands (#2089)
|
||||
|
|
|
@ -17,12 +17,12 @@ func (x Node) PublicKey() []byte {
|
|||
// IterateAddresses iterates over all announced network addresses
|
||||
// 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() {
|
||||
if f(addr) {
|
||||
return
|
||||
}
|
||||
}
|
||||
(netmap.NodeInfo)(x).IterateNetworkEndpoints(f)
|
||||
}
|
||||
|
||||
// NumberOfAddresses returns number of announced network addresses.
|
||||
|
|
Loading…
Reference in a new issue