Skip to content

Commit ffe6a41

Browse files
wait till start of the new epoch
1 parent ffa3f1e commit ffe6a41

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/e2e_tests/test_incentive.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from tests.e2e_tests.utils.chain_interactions import (
66
sudo_set_admin_utils,
77
wait_epoch,
8+
wait_interval,
89
)
910

1011

@@ -66,11 +67,15 @@ async def test_incentive(local_chain, subtensor, templates, alice_wallet, bob_wa
6667
assert bob_neuron.trust == 0
6768

6869
# update weights_set_rate_limit for fast-blocks
70+
tempo = subtensor.tempo(netuid)
6971
status, error = sudo_set_admin_utils(
7072
local_chain,
7173
alice_wallet,
7274
call_function="sudo_set_weights_set_rate_limit",
73-
call_params={"netuid": netuid, "weights_set_rate_limit": 10},
75+
call_params={
76+
"netuid": netuid,
77+
"weights_set_rate_limit": tempo,
78+
},
7479
)
7580

7681
assert error is None
@@ -82,8 +87,8 @@ async def test_incentive(local_chain, subtensor, templates, alice_wallet, bob_wa
8287
async with asyncio.timeout(60):
8388
await validator.set_weights.wait()
8489

85-
# Wait few epochs
86-
await wait_epoch(subtensor, netuid, times=4)
90+
# Wait till new epoch
91+
await wait_interval(tempo, subtensor, netuid)
8792

8893
# Refresh metagraph
8994
metagraph = subtensor.metagraph(netuid)

0 commit comments

Comments
 (0)