[#1689] Remove deprecated NodeInfo.IterateNetworkEndpoints()

Change-Id: Ic78f18aed11fab34ee3147ceea657296b89fe60c
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2025-04-04 20:22:05 +03:00
parent 56d09a9957
commit bf06c4fb4b
11 changed files with 83 additions and 82 deletions

View file

@ -17,7 +17,11 @@ 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 s := range (netmap.NodeInfo)(x).NetworkEndpoints() {
if f(s) {
return
}
}
}
// NumberOfAddresses returns number of announced network addresses.