(self, endpoint_or_address, port=None)
| 47 | self.token_map = {} |
| 48 | |
| 49 | def get_host(self, endpoint_or_address, port=None): |
| 50 | if not isinstance(endpoint_or_address, EndPoint): |
| 51 | for host in self.hosts.values(): |
| 52 | if (host.address == endpoint_or_address and |
| 53 | (port is None or host.broadcast_rpc_port is None or host.broadcast_rpc_port == port)): |
| 54 | return host |
| 55 | else: |
| 56 | return self.hosts.get(endpoint_or_address) |
| 57 | |
| 58 | def all_hosts(self): |
| 59 | return self.hosts.values() |
no test coverage detected