From b6fc3b16ae4ea5bee8f67ff9d3a8e1df2127c9f5 Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Mon, 25 Nov 2024 09:16:53 -0800 Subject: [PATCH] Fixes logic for checking block_since_last_update --- tests/e2e_tests/test_root_set_weights.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/e2e_tests/test_root_set_weights.py b/tests/e2e_tests/test_root_set_weights.py index 8cf736bf32..e23ccfc05d 100644 --- a/tests/e2e_tests/test_root_set_weights.py +++ b/tests/e2e_tests/test_root_set_weights.py @@ -130,10 +130,11 @@ async def test_root_reg_hyperparams(local_chain): alice_wallet.hotkey.ss58_address, netuid ) - # Fetch the block since last update, so we can compare later - initial_block = subtensor.blocks_since_last_update( + # Fetch the block since last update for the neuron + block_since_update = subtensor.blocks_since_last_update( netuid=netuid, uid=alice_uid_sn_1 ) + assert block_since_update is not None # Verify subnet created successfully assert local_chain.query( @@ -191,10 +192,6 @@ async def test_root_reg_hyperparams(local_chain): return_error_message=True, ) - updated_block = subtensor.blocks_since_last_update(netuid=netuid, uid=0) - # Ensure updates are reflected through incremental block numbers - assert updated_block > initial_block - # TODO: Implement # This registers neuron using pow but it doesn't work on fast-blocks - we get stale pow # pow_registration = subtensor.register(bob_wallet, netuid=1)