Skip to content

Commit f14b953

Browse files
committed
rename use_nonce function
1 parent 12e8c1c commit f14b953

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

tests/e2e_tests/test_commit_weights.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from tests.e2e_tests.utils.chain_interactions import (
88
sudo_set_admin_utils,
99
sudo_set_hyperparameter_bool,
10-
use_nonce,
10+
use_and_wait_for_next_nonce,
1111
wait_epoch,
1212
)
1313

@@ -228,7 +228,7 @@ async def test_commit_weights_uses_next_nonce(local_chain, subtensor, alice_wall
228228
salt3[0] += 2 # Increment the first byte to produce a different commit hash
229229

230230
# Commit all three salts
231-
async with use_nonce(subtensor, alice_wallet):
231+
async with use_and_wait_for_next_nonce(subtensor, alice_wallet):
232232
success, message = subtensor.commit_weights(
233233
alice_wallet,
234234
netuid,
@@ -241,7 +241,7 @@ async def test_commit_weights_uses_next_nonce(local_chain, subtensor, alice_wall
241241

242242
assert success is True
243243

244-
async with use_nonce(subtensor, alice_wallet):
244+
async with use_and_wait_for_next_nonce(subtensor, alice_wallet):
245245
success, message = subtensor.commit_weights(
246246
alice_wallet,
247247
netuid,
@@ -254,7 +254,7 @@ async def test_commit_weights_uses_next_nonce(local_chain, subtensor, alice_wall
254254

255255
assert success is True
256256

257-
async with use_nonce(subtensor, alice_wallet):
257+
async with use_and_wait_for_next_nonce(subtensor, alice_wallet):
258258
success, message = subtensor.commit_weights(
259259
alice_wallet,
260260
netuid,

tests/e2e_tests/test_set_weights.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from tests.e2e_tests.utils.chain_interactions import (
77
sudo_set_hyperparameter_bool,
88
sudo_set_admin_utils,
9-
use_nonce,
9+
use_and_wait_for_next_nonce,
1010
wait_epoch,
1111
)
1212

@@ -109,7 +109,7 @@ async def test_set_weights_uses_next_nonce(local_chain, subtensor, alice_wallet)
109109

110110
# Set weights for each subnet
111111
for netuid in netuids:
112-
async with use_nonce(subtensor, alice_wallet):
112+
async with use_and_wait_for_next_nonce(subtensor, alice_wallet):
113113
success, message = subtensor.set_weights(
114114
alice_wallet,
115115
netuid,

tests/e2e_tests/utils/chain_interactions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ async def wait_interval(
152152

153153

154154
@contextlib.asynccontextmanager
155-
async def use_nonce(
155+
async def use_and_wait_for_next_nonce(
156156
subtensor: "Subtensor",
157157
wallet: "Wallet",
158158
sleep: float = 0.25,

0 commit comments

Comments
 (0)