From 676b3b9dea173553f321ecdf96dcbf6c6f7d49f6 Mon Sep 17 00:00:00 2001 From: open-junius Date: Wed, 6 Nov 2024 23:25:48 +0800 Subject: [PATCH] use wait epoch --- tests/e2e_tests/test_commit_weights.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/e2e_tests/test_commit_weights.py b/tests/e2e_tests/test_commit_weights.py index 91cdf06e4..d97d4b08f 100644 --- a/tests/e2e_tests/test_commit_weights.py +++ b/tests/e2e_tests/test_commit_weights.py @@ -13,6 +13,7 @@ register_subnet, sudo_set_hyperparameter_bool, sudo_set_hyperparameter_values, + wait_epoch, wait_interval, ) from tests.e2e_tests.utils.e2e_test_utils import setup_wallet @@ -142,11 +143,11 @@ async def test_commit_and_reveal_weights(local_chain): weight_commit_reveal_interval = subtensor.query_module( module="SubtensorModule", name="RevealPeriodEpochs", params=[netuid] ) - periods = reveal_periods.value + + periods = weight_commit_reveal_interval.value assert periods > 0, "Invalid RevealPeriodEpochs" - # Wait until the reveal block range, the default temp is 300 - await wait_interval(300, subtensor) + await wait_epoch(subtensor, netuid=netuid) # Reveal weights success, message = subtensor.reveal_weights(