@@ -45,9 +45,7 @@ async def test_commit_and_reveal_weights_legacy(local_chain, subtensor, alice_wa
45
45
netuid ,
46
46
), "Unable to enable commit reveal on the subnet"
47
47
48
- assert subtensor .get_subnet_hyperparameters (
49
- netuid = netuid ,
50
- ).commit_reveal_weights_enabled , "Failed to enable commit/reveal"
48
+ assert subtensor .commit_reveal_enabled (netuid ), "Failed to enable commit/reveal"
51
49
52
50
assert (
53
51
subtensor .get_subnet_hyperparameters (netuid = netuid ).commit_reveal_period == 1
@@ -114,11 +112,9 @@ async def test_commit_and_reveal_weights_legacy(local_chain, subtensor, alice_wa
114
112
assert commit_block > 0 , f"Invalid block number: { commit_block } "
115
113
116
114
# Query the WeightCommitRevealInterval storage map
117
- reveal_periods = subtensor .query_module (
118
- module = "SubtensorModule" , name = "RevealPeriodEpochs" , params = [netuid ]
119
- )
120
- periods = reveal_periods
121
- assert periods > 0 , "Invalid RevealPeriodEpochs"
115
+ assert (
116
+ subtensor .get_subnet_reveal_period_epochs (netuid ) > 0
117
+ ), "Invalid RevealPeriodEpochs"
122
118
123
119
# Wait until the reveal block range
124
120
await wait_epoch (subtensor , netuid )
@@ -187,9 +183,7 @@ async def test_commit_weights_uses_next_nonce(local_chain, subtensor, alice_wall
187
183
netuid ,
188
184
), "Unable to enable commit reveal on the subnet"
189
185
190
- assert subtensor .get_subnet_hyperparameters (
191
- netuid = netuid ,
192
- ).commit_reveal_weights_enabled , "Failed to enable commit/reveal"
186
+ assert subtensor .commit_reveal_enabled (netuid ), "Failed to enable commit/reveal"
193
187
194
188
assert (
195
189
subtensor .get_subnet_hyperparameters (netuid = netuid ).commit_reveal_period == 1
0 commit comments