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

CHIA-942 Use launcher_id as the primary key when updating (current) pool config. #18341

Merged
merged 1 commit into from
Jul 22, 2024
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
4 changes: 3 additions & 1 deletion chia/pools/pool_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def update_pool_config_entry(
updated = False
for pool_config_dict in pool_list:
try:
if hexstr_to_bytes(pool_config_dict["owner_public_key"]) == bytes(pool_wallet_config.owner_public_key):
if hexstr_to_bytes(pool_config_dict["launcher_id"]) == bytes(pool_wallet_config.launcher_id):
if update_closure(pool_config_dict):
updated = True
except Exception as e:
Expand All @@ -101,6 +101,8 @@ def update_pool_config_entry(
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:
Expand Down
Loading