diff --git a/bittensor_cli/src/__init__.py b/bittensor_cli/src/__init__.py index bb3bd07f4..ce55bfcd6 100644 --- a/bittensor_cli/src/__init__.py +++ b/bittensor_cli/src/__init__.py @@ -38,7 +38,6 @@ class Constants: "test": "0x8f9cf856bf558a14440e75569c9e58594757048d7b3a84b5d25f6bd978263105", } delegates_detail_url = "https://raw.githubusercontent.com/opentensor/bittensor-delegates/main/public/delegates.json" - emission_start_schedule = 7 * 24 * 60 * 60 / 12 # 7 days @dataclass diff --git a/bittensor_cli/src/commands/subnets/subnets.py b/bittensor_cli/src/commands/subnets/subnets.py index 81febc4b4..fd050bd0a 100644 --- a/bittensor_cli/src/commands/subnets/subnets.py +++ b/bittensor_cli/src/commands/subnets/subnets.py @@ -2320,14 +2320,21 @@ async def get_start_schedule( if not await subtensor.subnet_exists(netuid): print_error(f"Subnet {netuid} does not exist.") return None - - registration_block = await subtensor.query( - module="SubtensorModule", - storage_function="NetworkRegisteredAt", - params=[netuid], + block_hash = await subtensor.substrate.get_chain_head() + registration_block, min_blocks_to_start, current_block = await asyncio.gather( + subtensor.query( + module="SubtensorModule", + storage_function="NetworkRegisteredAt", + params=[netuid], + block_hash=block_hash, + ), + subtensor.substrate.get_constant( + module_name="SubtensorModule", + constant_name="DurationOfStartCall", + block_hash=block_hash, + ), + subtensor.substrate.get_block_number(block_hash=block_hash), ) - min_blocks_to_start = Constants.emission_start_schedule - current_block = await subtensor.substrate.get_block_number() potential_start_block = registration_block + min_blocks_to_start if current_block < potential_start_block: