Implement upgrade_firmware and make necessary changes according to the reviews.

This commit is contained in:
1e9abhi1e10
2024-06-12 08:45:46 +05:30
parent 18e6fc2a3c
commit 2a66602c2c
2 changed files with 69 additions and 4 deletions

View File

@@ -560,15 +560,15 @@ class BTMinerRPCAPI(BaseMinerRPCAPI):
"""
return await self.send_privileged_command("set_normal_power")
async def upgrade_firmware(self, firmware: bytes):
async def update_firmware(self, firmware: bytes):
"""Upgrade the firmware running on the miner and using the firmware passed in bytes.
Parameters:
firmware (bytes): The firmware binary data to be uploaded.
Returns:
bool: A boolean indicating the success of the firmware upgrade.
Raises:
APIError: If the miner is not ready for firmware update.
"""