- for peer_record in peer_records:
- peer_auth = peer_record['peer_authority']
- if peer_auth in registries:
+ found_records = []
+ hrn_dict = {}
+ for record in peer_records:
+ registry_hrn = tree.best_match(record['hrn'])
+ if registry_hrn not in hrn_dict:
+ hrn_dict[registry_hrn] = []
+ hrn_dict[registry_hrn].append(record['hrn'])
+
+ # attempt to resolve the record at the authoritative interface
+ for registry_hrn in hrn_dict:
+ if registry_hrn in registries:
+ records = []
+ target_hrns = hrn_dict[registry_hrn]