File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1501,13 +1501,13 @@ async def get_metagraph_info(
1501
1501
field_indices=[SelectiveMetagraphIndex.Name, SelectiveMetagraphIndex.OwnerHotkeys]
1502
1502
)
1503
1503
"""
1504
- indices = SelectiveMetagraphIndex .all_indices ()
1504
+ indexes = SelectiveMetagraphIndex .all_indices ()
1505
1505
1506
1506
if field_indices :
1507
1507
if isinstance (field_indices , list ) and all (
1508
1508
isinstance (f , SelectiveMetagraphIndex ) for f in field_indices
1509
1509
):
1510
- indices = [f .value for f in field_indices ]
1510
+ indexes = [f .value for f in field_indices ]
1511
1511
else :
1512
1512
raise ValueError (
1513
1513
"`field_indices` must be a list of SelectiveMetagraphIndex items."
@@ -1520,7 +1520,7 @@ async def get_metagraph_info(
1520
1520
query = await self .substrate .runtime_call (
1521
1521
"SubnetInfoRuntimeApi" ,
1522
1522
"get_selective_metagraph" ,
1523
- params = [netuid , indices ],
1523
+ params = [netuid , indexes if 0 in indexes else [ 0 ] + indexes ],
1524
1524
block_hash = block_hash ,
1525
1525
)
1526
1526
if query .value is None :
Original file line number Diff line number Diff line change @@ -1158,13 +1158,13 @@ def get_metagraph_info(
1158
1158
field_indices=[SelectiveMetagraphIndex.Name, SelectiveMetagraphIndex.OwnerHotkeys]
1159
1159
)
1160
1160
"""
1161
- indices = SelectiveMetagraphIndex .all_indices ()
1161
+ indexes = SelectiveMetagraphIndex .all_indices ()
1162
1162
1163
1163
if field_indices :
1164
1164
if isinstance (field_indices , list ) and all (
1165
1165
isinstance (f , SelectiveMetagraphIndex ) for f in field_indices
1166
1166
):
1167
- indices = [f .value for f in field_indices ]
1167
+ indexes = [f .value for f in field_indices ]
1168
1168
else :
1169
1169
raise ValueError (
1170
1170
"`field_indices` must be a list of SelectiveMetagraphIndex items."
@@ -1174,7 +1174,7 @@ def get_metagraph_info(
1174
1174
query = self .substrate .runtime_call (
1175
1175
"SubnetInfoRuntimeApi" ,
1176
1176
"get_selective_metagraph" ,
1177
- params = [netuid , indices ],
1177
+ params = [netuid , indexes if 0 in indexes else [ 0 ] + indexes ],
1178
1178
block_hash = block_hash ,
1179
1179
)
1180
1180
if query .value is None :
You can’t perform that action at this time.
0 commit comments