Skip to content

Commit 9f47cf6

Browse files
committed
PR Suggestions
1 parent 51ad4f4 commit 9f47cf6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

bittensor/core/async_subtensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ async def all_subnets(
827827
)
828828
else:
829829
logging.warning(
830-
f"Unable to fetch subnet prices for block {block_number}, block hash {block_hash}"
830+
f"Unable to fetch subnet prices for block {block_number}, block hash {block_hash}: {subnet_prices}"
831831
)
832832
return DynamicInfo.list_from_dicts(decoded)
833833

@@ -1159,7 +1159,7 @@ async def get_all_subnets_info(
11591159
subnet.update({"price": prices.get(subnet["netuid"], 0)})
11601160
else:
11611161
logging.warning(
1162-
f"Unable to fetch subnet prices for block {block}, block hash {block_hash}"
1162+
f"Unable to fetch subnet prices for block {block}, block hash {block_hash}: {prices}"
11631163
)
11641164

11651165
return SubnetInfo.list_from_dicts(result)

bittensor/core/subtensor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,8 @@ def all_subnets(self, block: Optional[int] = None) -> Optional[list["DynamicInfo
462462
sn.update(
463463
{"price": subnet_prices.get(sn["netuid"], Balance.from_tao(0))}
464464
)
465-
except SubstrateRequestException:
466-
logging.warning(f"Unable to fetch subnet prices for block {block}")
465+
except SubstrateRequestException as e:
466+
logging.warning(f"Unable to fetch subnet prices for block {block}: {e}")
467467

468468
return DynamicInfo.list_from_dicts(decoded)
469469

@@ -656,7 +656,7 @@ def get_all_subnets_info(self, block: Optional[int] = None) -> list["SubnetInfo"
656656
for subnet in result:
657657
subnet.update({"price": subnets_prices.get(subnet["netuid"], 0)})
658658
except SubstrateRequestException:
659-
logging.warning(f"Unable to fetch subnet prices for block {block}")
659+
logging.warning(f"Unable to fetch subnet prices for block {block}: {e}")
660660

661661
return SubnetInfo.list_from_dicts(result)
662662

0 commit comments

Comments
 (0)