@@ -293,11 +293,13 @@ async def test_delegates(local_chain, subtensor, alice_wallet, bob_wallet):
293
293
bittensor .logging .console .success ("Test [green]test_delegates[/green] passed." )
294
294
295
295
296
- def test_nominator_min_required_stake (local_chain , subtensor , alice_wallet , bob_wallet ):
296
+ def test_nominator_min_required_stake (
297
+ local_chain , subtensor , alice_wallet , bob_wallet , dave_wallet
298
+ ):
297
299
"""
298
300
Tests:
299
301
- Check default NominatorMinRequiredStake
300
- - Add Stake to Nominate
302
+ - Add Stake to Nominate from Dave to Bob
301
303
- Update NominatorMinRequiredStake
302
304
- Check Nominator is removed
303
305
"""
@@ -323,15 +325,22 @@ def test_nominator_min_required_stake(local_chain, subtensor, alice_wallet, bob_
323
325
assert minimum_required_stake == Balance (0 )
324
326
325
327
subtensor .burned_register (
326
- bob_wallet ,
327
- alice_subnet_netuid ,
328
+ wallet = bob_wallet ,
329
+ netuid = alice_subnet_netuid ,
330
+ wait_for_inclusion = True ,
331
+ wait_for_finalization = True ,
332
+ )
333
+
334
+ subtensor .burned_register (
335
+ wallet = dave_wallet ,
336
+ netuid = alice_subnet_netuid ,
328
337
wait_for_inclusion = True ,
329
338
wait_for_finalization = True ,
330
339
)
331
340
332
341
success = subtensor .add_stake (
333
- alice_wallet ,
334
- bob_wallet .hotkey .ss58_address ,
342
+ wallet = dave_wallet ,
343
+ hotkey_ss58 = bob_wallet .hotkey .ss58_address ,
335
344
netuid = alice_subnet_netuid ,
336
345
amount = Balance .from_tao (10_000 ),
337
346
wait_for_inclusion = True ,
@@ -341,17 +350,17 @@ def test_nominator_min_required_stake(local_chain, subtensor, alice_wallet, bob_
341
350
assert success is True
342
351
343
352
stake = subtensor .get_stake (
344
- alice_wallet .coldkey .ss58_address ,
345
- bob_wallet .hotkey .ss58_address ,
353
+ coldkey_ss58 = dave_wallet .coldkey .ss58_address ,
354
+ hotkey_ss58 = bob_wallet .hotkey .ss58_address ,
346
355
netuid = alice_subnet_netuid ,
347
356
)
348
357
349
358
assert stake > 0
350
359
351
360
# this will trigger clear_small_nominations
352
361
sudo_set_admin_utils (
353
- local_chain ,
354
- alice_wallet ,
362
+ substrate = local_chain ,
363
+ wallet = alice_wallet ,
355
364
call_function = "sudo_set_nominator_min_required_stake" ,
356
365
call_params = {
357
366
"min_stake" : "100000000000000" ,
@@ -363,8 +372,8 @@ def test_nominator_min_required_stake(local_chain, subtensor, alice_wallet, bob_
363
372
assert minimum_required_stake == Balance .from_tao (100_000 )
364
373
365
374
stake = subtensor .get_stake (
366
- alice_wallet .coldkey .ss58_address ,
367
- bob_wallet .hotkey .ss58_address ,
375
+ coldkey_ss58 = dave_wallet .coldkey .ss58_address ,
376
+ hotkey_ss58 = bob_wallet .hotkey .ss58_address ,
368
377
netuid = alice_subnet_netuid ,
369
378
)
370
379
0 commit comments