mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-11 10:56:14 +03:00
remove unused Service(server_listen_ports=) parameter (#14928)
<!-- Merging Requirements: - Please give your PR a title that is release-note friendly - In order to be merged, you must add the most appropriate category Label (Added, Changed, Fixed) to your PR --> <!-- Explain why this is an improvement (Does this add missing functionality, improve performance, or reduce complexity?) --> ### Purpose: remove dead code so the remaining code is more comprehensible <!-- Does this PR introduce a breaking change? --> ### Current Behavior: ### New Behavior: <!-- As we aim for complete code coverage, please include details regarding unit, and regression tests --> ### Testing Notes: <!-- Attach any visual examples, or supporting evidence (attach any .gif/video/console output below) -->
This commit is contained in:
commit
9f0a2ece07
@ -54,7 +54,6 @@ def create_full_node_crawler_service(
|
||||
advertised_port=service_config["port"],
|
||||
service_name="full_node",
|
||||
upnp_ports=[],
|
||||
server_listen_ports=[service_config["port"]],
|
||||
on_connect_callback=crawler.on_connect,
|
||||
network_id=network_id,
|
||||
rpc_info=rpc_info,
|
||||
|
@ -51,7 +51,6 @@ def create_data_layer_service(
|
||||
rpc_info = (DataLayerRpcApi, cast(int, service_config["rpc_port"]))
|
||||
|
||||
return Service(
|
||||
server_listen_ports=[service_config["port"]],
|
||||
root_path=root_path,
|
||||
config=config,
|
||||
node=data_layer,
|
||||
|
@ -60,7 +60,6 @@ def create_farmer_service(
|
||||
node_type=NodeType.FARMER,
|
||||
advertised_port=service_config["port"],
|
||||
service_name=SERVICE_NAME,
|
||||
server_listen_ports=[service_config["port"]],
|
||||
connect_peers=connect_peers,
|
||||
on_connect_callback=farmer.on_connect,
|
||||
network_id=network_id,
|
||||
|
@ -59,7 +59,6 @@ def create_full_node_service(
|
||||
advertised_port=service_config["port"],
|
||||
service_name=SERVICE_NAME,
|
||||
upnp_ports=upnp_list,
|
||||
server_listen_ports=[service_config["port"]],
|
||||
on_connect_callback=full_node.on_connect,
|
||||
network_id=network_id,
|
||||
rpc_info=rpc_info,
|
||||
|
@ -49,7 +49,6 @@ def create_harvester_service(
|
||||
node_type=NodeType.HARVESTER,
|
||||
advertised_port=service_config["port"],
|
||||
service_name=SERVICE_NAME,
|
||||
server_listen_ports=[service_config["port"]],
|
||||
connect_peers=[] if farmer_peer is None else [farmer_peer],
|
||||
network_id=network_id,
|
||||
rpc_info=rpc_info,
|
||||
|
@ -39,7 +39,6 @@ def create_introducer_service(
|
||||
peer_api=node__api,
|
||||
node_type=NodeType.INTRODUCER,
|
||||
service_name=SERVICE_NAME,
|
||||
server_listen_ports=[service_config["port"]],
|
||||
network_id=network_id,
|
||||
advertised_port=advertised_port,
|
||||
connect_to_daemon=connect_to_daemon,
|
||||
|
@ -55,7 +55,6 @@ class Service(Generic[_T_RpcServiceProtocol]):
|
||||
*,
|
||||
config: Dict[str, Any],
|
||||
upnp_ports: List[int] = [],
|
||||
server_listen_ports: List[int] = [],
|
||||
connect_peers: List[PeerInfo] = [],
|
||||
on_connect_callback: Optional[Callable[[WSChiaConnection], Awaitable[None]]] = None,
|
||||
rpc_info: Optional[RpcInfo] = None,
|
||||
@ -121,7 +120,6 @@ class Service(Generic[_T_RpcServiceProtocol]):
|
||||
self._log.warning(f"No set_server method for {service_name}")
|
||||
|
||||
self._upnp_ports = upnp_ports
|
||||
self._server_listen_ports = server_listen_ports
|
||||
|
||||
self._api = peer_api
|
||||
self._node = node
|
||||
|
@ -57,7 +57,6 @@ def create_timelord_service(
|
||||
node_type=NodeType.TIMELORD,
|
||||
advertised_port=service_config["port"],
|
||||
service_name=SERVICE_NAME,
|
||||
server_listen_ports=[service_config["port"]],
|
||||
connect_peers=connect_peers,
|
||||
network_id=network_id,
|
||||
rpc_info=rpc_info,
|
||||
|
@ -64,7 +64,6 @@ def create_wallet_service(
|
||||
rpc_info = (WalletRpcApi, service_config["rpc_port"])
|
||||
|
||||
return Service(
|
||||
server_listen_ports=[service_config["port"]],
|
||||
root_path=root_path,
|
||||
config=config,
|
||||
node=node,
|
||||
|
@ -54,7 +54,6 @@ def create_full_node_simulator_service(
|
||||
node_type=NodeType.FULL_NODE,
|
||||
advertised_port=service_config["port"],
|
||||
service_name=SERVICE_NAME,
|
||||
server_listen_ports=[service_config["port"]],
|
||||
on_connect_callback=node.on_connect,
|
||||
network_id=network_id,
|
||||
rpc_info=(SimulatorFullNodeRpcApi, service_config["rpc_port"]),
|
||||
|
Loading…
Reference in New Issue
Block a user