bug: fix an issue with missing a check for bosminer config when getting data.
This commit is contained in:
@@ -690,14 +690,15 @@ class BOSMiner(BaseMiner):
|
|||||||
# need to use get_config, as this will never read perfectly as there are some bad edge cases
|
# need to use get_config, as this will never read perfectly as there are some bad edge cases
|
||||||
groups = []
|
groups = []
|
||||||
cfg = await self.get_config()
|
cfg = await self.get_config()
|
||||||
for group in cfg.pool_groups:
|
if cfg:
|
||||||
pools = {"quota": group.quota}
|
for group in cfg.pool_groups:
|
||||||
for _i, _pool in enumerate(group.pools):
|
pools = {"quota": group.quota}
|
||||||
pools[f"pool_{_i + 1}_url"] = _pool.url.replace(
|
for _i, _pool in enumerate(group.pools):
|
||||||
"stratum+tcp://", ""
|
pools[f"pool_{_i + 1}_url"] = _pool.url.replace(
|
||||||
).replace("stratum2+tcp://", "")
|
"stratum+tcp://", ""
|
||||||
pools[f"pool_{_i + 1}_user"] = _pool.username
|
).replace("stratum2+tcp://", "")
|
||||||
groups.append(pools)
|
pools[f"pool_{_i + 1}_user"] = _pool.username
|
||||||
|
groups.append(pools)
|
||||||
return groups
|
return groups
|
||||||
else:
|
else:
|
||||||
groups[0][f"pool_{i + 1}_url"] = (
|
groups[0][f"pool_{i + 1}_url"] = (
|
||||||
|
|||||||
Reference in New Issue
Block a user