@@ -30,7 +30,7 @@ async def test_local_txs(seeded_random: random.Random) -> None:
3030 transaction_queue = TransactionQueue (1000 , log )
3131 # test 1 tx
3232 first_tx = get_transaction_queue_entry (None , 0 )
33- await transaction_queue .put (first_tx , None )
33+ transaction_queue .put (first_tx , None )
3434
3535 result1 = await transaction_queue .pop ()
3636
@@ -40,7 +40,7 @@ async def test_local_txs(seeded_random: random.Random) -> None:
4040 num_txs = 2000
4141 list_txs = [get_transaction_queue_entry (bytes32 .random (seeded_random ), i ) for i in range (num_txs )]
4242 for tx in list_txs :
43- await transaction_queue .put (tx , None )
43+ transaction_queue .put (tx , None )
4444
4545 resulting_txs = []
4646 for _ in range (num_txs ):
@@ -58,12 +58,12 @@ async def test_one_peer_and_await(seeded_random: random.Random) -> None:
5858
5959 list_txs = [get_transaction_queue_entry (peer_id , i ) for i in range (num_txs )]
6060 for tx in list_txs :
61- await transaction_queue .put (tx , peer_id )
61+ transaction_queue .put (tx , peer_id )
6262
6363 # test transaction priority
6464 local_txs = [get_transaction_queue_entry (None , i ) for i in range (int (num_txs / 5 ))] # 20 txs
6565 for tx in local_txs :
66- await transaction_queue .put (tx , None )
66+ transaction_queue .put (tx , None )
6767
6868 resulting_txs = []
6969 for _ in range (num_txs + len (local_txs )):
@@ -80,7 +80,7 @@ async def test_one_peer_and_await(seeded_random: random.Random) -> None:
8080 with pytest .raises (asyncio .InvalidStateError ): # task is not done, so we expect an error when getting result
8181 task .result ()
8282 # add a tx to test task completion
83- await transaction_queue .put (get_transaction_queue_entry (None , 0 ), None )
83+ transaction_queue .put (get_transaction_queue_entry (None , 0 ), None )
8484 await asyncio .wait_for (task , 1 ) # we should never time out here
8585
8686
@@ -95,7 +95,7 @@ async def test_lots_of_peers(seeded_random: random.Random) -> None:
9595 # 100 txs per peer
9696 list_txs = [get_transaction_queue_entry (peer_id , i ) for peer_id in peer_ids for i in range (num_txs )]
9797 for tx in list_txs :
98- await transaction_queue .put (tx , tx .peer_id ) # type: ignore[attr-defined]
98+ transaction_queue .put (tx , tx .peer_id ) # type: ignore[attr-defined]
9999
100100 resulting_txs = []
101101 for _ in range (total_txs ):
@@ -117,11 +117,11 @@ async def test_full_queue(seeded_random: random.Random) -> None:
117117 # 999 txs per peer then 1 to fail later
118118 list_txs = [get_transaction_queue_entry (peer_id , i ) for peer_id in peer_ids for i in range (num_txs )]
119119 for tx in list_txs :
120- await transaction_queue .put (tx , tx .peer_id ) # type: ignore[attr-defined]
120+ transaction_queue .put (tx , tx .peer_id ) # type: ignore[attr-defined]
121121
122122 # test failure case.
123123 with pytest .raises (TransactionQueueFull ):
124- await transaction_queue .put (get_transaction_queue_entry (peer_ids [0 ], 1001 ), peer_ids [0 ])
124+ transaction_queue .put (get_transaction_queue_entry (peer_ids [0 ], 1001 ), peer_ids [0 ])
125125
126126 resulting_txs = []
127127 for _ in range (total_txs ):
@@ -142,7 +142,7 @@ async def test_queue_cleanup_and_fairness(seeded_random: random.Random) -> None:
142142
143143 list_txs = peer_tx_a + peer_tx_b + peer_tx_c
144144 for tx in list_txs :
145- await transaction_queue .put (tx , tx .peer_id ) # type: ignore[attr-defined]
145+ transaction_queue .put (tx , tx .peer_id ) # type: ignore[attr-defined]
146146
147147 resulting_ids = []
148148 for _ in range (3 ): # we validate we get one transaction per peer
0 commit comments