checkUpdates function
Checks if the peer addresses have changed
Implementation
bool checkUpdates(Map<PeerId, AddrInfo> orig, Map<PeerId, AddrInfo> update) {
if (orig.length != update.length) {
return true;
}
for (final entry in update.entries) {
final p = entry.key;
final ai = entry.value;
if (orig.containsKey(p)) {
final prevAi = orig[p]!;
if (AddrInfo.mergeAddrInfos(prevAi, ai) != null) {
return true;
}
} else {
return true;
}
}
return false;
}