Skip to content

Commit af4be54

Browse files
author
Roman
committed
fix
1 parent 6b442a2 commit af4be54

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

tests/e2e_tests/test_hotkeys.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ async def test_children(local_chain, subtensor, alice_wallet, bob_wallet, dave_w
9090
"""
9191

9292
dave_subnet_netuid = subtensor.get_total_subnets() # 2
93-
set_tempo = 10
93+
set_tempo = 10 # affect to non-fast-blocks mode
94+
9495
assert subtensor.register_subnet(dave_wallet, True, True)
9596
assert subtensor.subnet_exists(dave_subnet_netuid), (
9697
f"Subnet #{dave_subnet_netuid} does not exist."
@@ -99,25 +100,26 @@ async def test_children(local_chain, subtensor, alice_wallet, bob_wallet, dave_w
99100
assert wait_to_start_call(subtensor, dave_wallet, dave_subnet_netuid)
100101

101102
# set the same tempo for both type of nodes (to avoid tests timeout)
102-
assert (
103-
sudo_set_admin_utils(
104-
local_chain,
105-
alice_wallet,
106-
call_function="sudo_set_tempo",
107-
call_params={"netuid": dave_subnet_netuid, "tempo": set_tempo},
108-
)[0]
109-
is True
110-
)
103+
if not subtensor.is_fast_blocks():
104+
assert (
105+
sudo_set_admin_utils(
106+
local_chain,
107+
alice_wallet,
108+
call_function="sudo_set_tempo",
109+
call_params={"netuid": dave_subnet_netuid, "tempo": set_tempo},
110+
)[0]
111+
is True
112+
)
111113

112-
# assert (
113-
# sudo_set_admin_utils(
114-
# local_chain,
115-
# alice_wallet,
116-
# call_function="sudo_set_tx_rate_limit",
117-
# call_params={"tx_rate_limit": 100},
118-
# )[0]
119-
# is True
120-
# )
114+
# assert (
115+
# sudo_set_admin_utils(
116+
# local_chain,
117+
# alice_wallet,
118+
# call_function="sudo_set_tx_rate_limit",
119+
# call_params={"tx_rate_limit": 100},
120+
# )[0]
121+
# is True
122+
# )
121123

122124
with pytest.raises(RegistrationNotPermittedOnRootSubnet):
123125
subtensor.set_children(
@@ -269,9 +271,7 @@ async def test_children(local_chain, subtensor, alice_wallet, bob_wallet, dave_w
269271
assert pending == [(1.0, bob_wallet.hotkey.ss58_address)]
270272
logging.console.info(f"Cooldown 1 is: {cooldown}")
271273

272-
subtensor.wait_for_block(cooldown)
273-
274-
await wait_epoch(subtensor, netuid=dave_subnet_netuid)
274+
subtensor.wait_for_block(cooldown + 1)
275275

276276
success, children, error = subtensor.get_children(
277277
alice_wallet.hotkey.ss58_address,

0 commit comments

Comments
 (0)