Skip to content

Commit aa63fd7

Browse files
author
Roman
committed
use gather
1 parent 8533ff0 commit aa63fd7

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

bittensor/core/async_subtensor.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -646,13 +646,16 @@ async def all_subnets(
646646
)
647647
if not block_hash and reuse_block:
648648
block_hash = self.substrate.last_block_hash
649-
query = await self.substrate.runtime_call(
650-
"SubnetInfoRuntimeApi",
651-
"get_all_dynamic_info",
652-
block_hash=block_hash,
649+
650+
query, subnet_prices = await asyncio.gather(
651+
self.substrate.runtime_call(
652+
"SubnetInfoRuntimeApi",
653+
"get_all_dynamic_info",
654+
block_hash=block_hash,
655+
),
656+
self.get_subnet_prices(),
653657
)
654658

655-
subnet_prices = await self.get_subnet_prices()
656659
decoded = query.decode()
657660

658661
for sn in decoded:

0 commit comments

Comments
 (0)