diff --git a/chia/farmer/farmer.py b/chia/farmer/farmer.py index 45aa645e035e..acb96f7f1086 100644 --- a/chia/farmer/farmer.py +++ b/chia/farmer/farmer.py @@ -376,8 +376,9 @@ async def _pool_get_pool_info(self, pool_config: PoolWalletConfig) -> Optional[G response: Dict[str, Any] = json.loads(await resp.text()) self.log.info(f"GET /pool_info response: {response}") new_pool_url: Optional[str] = None - if resp.url != url and all(r.status in {301, 308} for r in resp.history): - new_pool_url = f"{resp.url}".replace("/pool_info", "") + response_url_str = f"{resp.url}" + if response_url_str != url and len(resp.history) > 0 and all(r.status in {301, 308} for r in resp.history): + new_pool_url = response_url_str.replace("/pool_info", "") return GetPoolInfoResult(pool_info=response, new_pool_url=new_pool_url) else: diff --git a/chia/pools/pool_config.py b/chia/pools/pool_config.py index 1efafbdc5419..2a85fc6efc64 100644 --- a/chia/pools/pool_config.py +++ b/chia/pools/pool_config.py @@ -96,13 +96,11 @@ def update_pool_config_entry( if update_closure(pool_config_dict): updated = True except Exception as e: - log.error(f"Exception updating config: {pool_config_dict} {e}") + log.error(f"Exception updating pool config {pool_config_dict} for launcher_id {pool_wallet_config.launcher_id}: {e}") if updated: log.info(update_log_message) config["pool"]["pool_list"] = pool_list save_config(root_path, "config.yaml", config) - else: - log.error(f"Failed to update pool config entry for launcher_id {pool_wallet_config.launcher_id}") async def update_pool_config(root_path: Path, pool_config_list: List[PoolWalletConfig]) -> None: