11import asyncio
2- import time
32
43import pytest
54
@@ -51,15 +50,13 @@ async def test_incentive(local_chain, subtensor, templates, alice_wallet, bob_wa
5150 # Get current miner/validator stats
5251 alice_neuron = metagraph .neurons [0 ]
5352
54- time .sleep (30 )
5553 assert alice_neuron .validator_permit is True
5654 assert alice_neuron .dividends == 0
5755 assert alice_neuron .stake .tao > 0
5856 assert alice_neuron .validator_trust == 0
5957
6058 bob_neuron = metagraph .neurons [1 ]
6159
62- time .sleep (30 )
6360 assert bob_neuron .incentive == 0
6461 assert bob_neuron .consensus == 0
6562 assert bob_neuron .rank == 0
@@ -77,23 +74,16 @@ async def test_incentive(local_chain, subtensor, templates, alice_wallet, bob_wa
7774 async with templates .miner (bob_wallet , netuid ):
7875 async with templates .validator (alice_wallet , netuid ):
7976 # wait for the Validator to process and set_weights
80- await asyncio .sleep (5 )
77+ await asyncio .sleep (30 )
8178
8279 # Wait until next epoch
8380 await wait_epoch (subtensor , netuid )
8481
85- # Wait few seconds for metagraph to update
86- await asyncio .sleep (5 )
87-
88- # Wait another epoch
89- await wait_epoch (subtensor , netuid )
90-
9182 # Refresh metagraph
9283 metagraph = subtensor .metagraph (netuid )
9384
9485 # Get current emissions and validate that Alice has gotten tao
9586 alice_neuron = metagraph .neurons [0 ]
96- time .sleep (5 )
9787
9888 assert alice_neuron .validator_permit is True
9989 assert alice_neuron .dividends == 1.0
0 commit comments