@@ -799,15 +799,15 @@ async def all_subnets(
799
799
subnets = await subtensor.all_subnets()
800
800
"""
801
801
block_hash = await self .determine_block_hash (
802
- block_number , block_hash , reuse_block
802
+ block = block_number , block_hash = block_hash , reuse_block = reuse_block
803
803
)
804
804
if not block_hash and reuse_block :
805
805
block_hash = self .substrate .last_block_hash
806
806
807
807
query , subnet_prices = await asyncio .gather (
808
808
self .substrate .runtime_call (
809
- "SubnetInfoRuntimeApi" ,
810
- "get_all_dynamic_info" ,
809
+ api = "SubnetInfoRuntimeApi" ,
810
+ method = "get_all_dynamic_info" ,
811
811
block_hash = block_hash ,
812
812
),
813
813
self .get_subnet_prices (),
@@ -3733,7 +3733,9 @@ async def subnet(
3733
3733
Returns:
3734
3734
Optional[DynamicInfo]: A DynamicInfo object, containing detailed information about a subnet.
3735
3735
"""
3736
- block_hash = await self .determine_block_hash (block , block_hash , reuse_block )
3736
+ block_hash = await self .determine_block_hash (
3737
+ block = block , block_hash = block_hash , reuse_block = reuse_block
3738
+ )
3737
3739
3738
3740
if not block_hash and reuse_block :
3739
3741
block_hash = self .substrate .last_block_hash
@@ -3746,7 +3748,15 @@ async def subnet(
3746
3748
)
3747
3749
3748
3750
if isinstance (decoded := query .decode (), dict ):
3749
- price = self .get_subnet_price (netuid = netuid , block = block )
3751
+ try :
3752
+ price = await self .get_subnet_price (
3753
+ netuid = netuid ,
3754
+ block = block ,
3755
+ block_hash = block_hash ,
3756
+ reuse_block = reuse_block ,
3757
+ )
3758
+ except SubstrateRequestException :
3759
+ price = None
3750
3760
return DynamicInfo .from_dict ({** decoded , "price" : price })
3751
3761
return None
3752
3762
0 commit comments