Add all the networks in a vertex to the index in VertexFinder.

styling
LEdoian 1 year ago
parent 7cf33d0fa2
commit b9ae64f643

@ -269,9 +269,13 @@ class VertexFinder:
self.topologies.append(topo) self.topologies.append(topo)
for v in topo.vertices: for v in topo.vertices:
id = v.id id = v.id
self.vertices[id].add(topo) self.vertices[id].append(topo)
# Add to various "indices" # Add to various "indices"
self.by_addr[id.address].add(id) if isinstance(id.address, tuple):
for addr in id.address:
self.by_addr[addr].add(id)
else:
self.by_addr[id.address].add(id)
self.by_rid[id.router_id].add(id) self.by_rid[id.router_id].add(id)
self.by_dr[id.dr_id].add(id) self.by_dr[id.dr_id].add(id)
self.by_discriminator[id.discriminator].add(id) self.by_discriminator[id.discriminator].add(id)

Loading…
Cancel
Save