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,18 @@ 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
- return_error_message = True ,
64
63
)
65
64
65
+ assert error is None
66
+ assert status is True
67
+
66
68
assert (
67
69
subtensor .get_subnet_hyperparameters (netuid = netuid ).weights_rate_limit == 0
68
70
), "Failed to set weights_rate_limit"
@@ -77,7 +79,6 @@ async def test_commit_and_reveal_weights_legacy(local_chain, subtensor, alice_wa
77
79
"netuid" : netuid ,
78
80
"tempo" : 100 ,
79
81
},
80
- return_error_message = True ,
81
82
)
82
83
83
84
# Commit-reveal values
@@ -192,15 +193,18 @@ async def test_commit_weights_uses_next_nonce(local_chain, subtensor, alice_wall
192
193
assert (
193
194
subtensor .weights_rate_limit (netuid = netuid ) > 0
194
195
), "Weights rate limit is below 0"
196
+
195
197
# Lower the rate limit
196
- assert sudo_set_hyperparameter_values (
198
+ status , error = sudo_set_admin_utils (
197
199
local_chain ,
198
200
alice_wallet ,
199
201
call_function = "sudo_set_weights_set_rate_limit" ,
200
202
call_params = {"netuid" : netuid , "weights_set_rate_limit" : "0" },
201
- return_error_message = True ,
202
203
)
203
204
205
+ assert error is None
206
+ assert status is True
207
+
204
208
assert (
205
209
subtensor .get_subnet_hyperparameters (netuid = netuid ).weights_rate_limit == 0
206
210
), "Failed to set weights_rate_limit"
0 commit comments