Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix mutable defaults in Service.__init__() #16472

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions chia/server/start_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,21 @@ def __init__(
network_id: str,
*,
config: Dict[str, Any],
upnp_ports: List[int] = [],
connect_peers: Set[UnresolvedPeerInfo] = set(),
upnp_ports: Optional[List[int]] = None,
connect_peers: Optional[Set[UnresolvedPeerInfo]] = None,
on_connect_callback: Optional[Callable[[WSChiaConnection], Awaitable[None]]] = None,
rpc_info: Optional[RpcInfo] = None,
connect_to_daemon: bool = True,
max_request_body_size: Optional[int] = None,
override_capabilities: Optional[List[Tuple[uint16, str]]] = None,
listen: bool = True,
) -> None:
if upnp_ports is None:
upnp_ports = []

if connect_peers is None:
connect_peers = set()

self.root_path = root_path
self.config = config
ping_interval = self.config.get("ping_interval")
Expand Down