Skip to content
Merged
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
5 changes: 3 additions & 2 deletions bittensor/_subtensor/subtensor_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,7 @@ def make_substrate_call_with_retry():

return NeuronInfoLite.list_from_vec_u8( result )

def metagraph( self, netuid: int, lite: bool = True, block: Optional[int] = None ) -> 'bittensor.Metagraph':
def metagraph( self, netuid: int, lite: bool = True, block: Optional[int] = None, sync: bool = False ) -> 'bittensor.Metagraph':
r""" Returns the metagraph for the subnet.
Args:
netuid ( int ):
Expand All @@ -1410,7 +1410,8 @@ def metagraph( self, netuid: int, lite: bool = True, block: Optional[int] = None
The metagraph for the subnet at the block.
"""
metagraph_ = bittensor.metagraph( network = self.network, netuid = netuid, lite = lite, sync = False )
metagraph_.sync( block = block, lite = lite, subtensor = self)
if sync:
metagraph_.sync( block = block, lite = lite, subtensor = self )

return metagraph_

Expand Down