|
7 | 7 | from tests.e2e_tests.utils.chain_interactions import (
|
8 | 8 | sudo_set_admin_utils,
|
9 | 9 | sudo_set_hyperparameter_bool,
|
10 |
| - sudo_set_hyperparameter_values, |
11 | 10 | wait_epoch,
|
12 | 11 | )
|
13 | 12 |
|
@@ -54,15 +53,19 @@ async def test_commit_and_reveal_weights_legacy(local_chain, subtensor, alice_wa
|
54 | 53 | assert (
|
55 | 54 | subtensor.weights_rate_limit(netuid=netuid) > 0
|
56 | 55 | ), "Weights rate limit is below 0"
|
| 56 | + |
57 | 57 | # Lower the rate limit
|
58 |
| - assert sudo_set_hyperparameter_values( |
| 58 | + status, error = sudo_set_admin_utils( |
59 | 59 | local_chain,
|
60 | 60 | alice_wallet,
|
61 | 61 | call_function="sudo_set_weights_set_rate_limit",
|
62 | 62 | call_params={"netuid": netuid, "weights_set_rate_limit": "0"},
|
63 | 63 | return_error_message=True,
|
64 | 64 | )
|
65 | 65 |
|
| 66 | + assert error is None |
| 67 | + assert status is True |
| 68 | + |
66 | 69 | assert (
|
67 | 70 | subtensor.get_subnet_hyperparameters(netuid=netuid).weights_rate_limit == 0
|
68 | 71 | ), "Failed to set weights_rate_limit"
|
@@ -192,15 +195,19 @@ async def test_commit_weights_uses_next_nonce(local_chain, subtensor, alice_wall
|
192 | 195 | assert (
|
193 | 196 | subtensor.weights_rate_limit(netuid=netuid) > 0
|
194 | 197 | ), "Weights rate limit is below 0"
|
| 198 | + |
195 | 199 | # Lower the rate limit
|
196 |
| - assert sudo_set_hyperparameter_values( |
| 200 | + status, error = sudo_set_admin_utils( |
197 | 201 | local_chain,
|
198 | 202 | alice_wallet,
|
199 | 203 | call_function="sudo_set_weights_set_rate_limit",
|
200 | 204 | call_params={"netuid": netuid, "weights_set_rate_limit": "0"},
|
201 | 205 | return_error_message=True,
|
202 | 206 | )
|
203 | 207 |
|
| 208 | + assert error is None |
| 209 | + assert status is True |
| 210 | + |
204 | 211 | assert (
|
205 | 212 | subtensor.get_subnet_hyperparameters(netuid=netuid).weights_rate_limit == 0
|
206 | 213 | ), "Failed to set weights_rate_limit"
|
|
0 commit comments