Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions bittensor/core/async_subtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3091,6 +3091,7 @@ async def subnet(

if isinstance(decoded := query.decode(), dict):
return DynamicInfo.from_dict(decoded)
return None

async def subnet_exists(
self,
Expand Down
6 changes: 4 additions & 2 deletions bittensor/core/subtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2399,8 +2399,10 @@ def subnet(self, netuid: int, block: Optional[int] = None) -> Optional[DynamicIn
params=[netuid],
block_hash=block_hash,
)
subnet = DynamicInfo.from_dict(query.decode()) # type: ignore
return subnet

if isinstance(decoded := query.decode(), dict):
return DynamicInfo.from_dict(decoded)
return None

def subnet_exists(self, netuid: int, block: Optional[int] = None) -> bool:
"""
Expand Down
Loading