@@ -195,6 +195,7 @@ async def test_eth_send_transaction_legacy(
195
195
assert txn ["gas" ] == 21000
196
196
assert txn ["gasPrice" ] == txn_params ["gasPrice" ]
197
197
198
+ @flaky (max_runs = 3 )
198
199
@pytest .mark .asyncio
199
200
async def test_eth_modify_transaction_legacy (
200
201
self , async_w3 : "AsyncWeb3" , async_unlocked_account : ChecksumAddress
@@ -225,6 +226,7 @@ async def test_eth_modify_transaction_legacy(
225
226
assert modified_txn ["gas" ] == 21000
226
227
assert modified_txn ["gasPrice" ] == cast (int , txn_params ["gasPrice" ]) * 2
227
228
229
+ @flaky (max_runs = 3 )
228
230
@pytest .mark .asyncio
229
231
async def test_eth_modify_transaction (
230
232
self , async_w3 : "AsyncWeb3" , async_unlocked_account : ChecksumAddress
@@ -2073,6 +2075,7 @@ async def test_async_eth_sign_ens_names(
2073
2075
assert is_bytes (signature )
2074
2076
assert len (signature ) == 32 + 32 + 1
2075
2077
2078
+ @flaky (max_runs = 3 )
2076
2079
@pytest .mark .asyncio
2077
2080
async def test_async_eth_replace_transaction_legacy (
2078
2081
self , async_w3 : "AsyncWeb3" , async_unlocked_account_dual_type : ChecksumAddress
@@ -2082,9 +2085,7 @@ async def test_async_eth_replace_transaction_legacy(
2082
2085
"to" : async_unlocked_account_dual_type ,
2083
2086
"value" : Wei (1 ),
2084
2087
"gas" : 21000 ,
2085
- "gasPrice" : async_w3 .to_wei (
2086
- 1 , "gwei"
2087
- ), # must be greater than base_fee post London
2088
+ "gasPrice" : async_w3 .to_wei (1 , "gwei" ),
2088
2089
}
2089
2090
txn_hash = await async_w3 .eth .send_transaction (txn_params )
2090
2091
@@ -2102,6 +2103,7 @@ async def test_async_eth_replace_transaction_legacy(
2102
2103
assert replace_txn ["gas" ] == 21000
2103
2104
assert replace_txn ["gasPrice" ] == txn_params ["gasPrice" ]
2104
2105
2106
+ @flaky (max_runs = 3 )
2105
2107
@pytest .mark .asyncio
2106
2108
async def test_async_eth_replace_transaction (
2107
2109
self , async_w3 : "AsyncWeb3" , async_unlocked_account_dual_type : ChecksumAddress
@@ -2136,6 +2138,7 @@ async def test_async_eth_replace_transaction(
2136
2138
assert replace_txn ["maxFeePerGas" ] == three_gwei_in_wei
2137
2139
assert replace_txn ["maxPriorityFeePerGas" ] == two_gwei_in_wei
2138
2140
2141
+ @flaky (max_runs = 3 )
2139
2142
@pytest .mark .asyncio
2140
2143
async def test_async_eth_replace_transaction_underpriced (
2141
2144
self , async_w3 : "AsyncWeb3" , async_unlocked_account_dual_type : ChecksumAddress
@@ -2258,6 +2261,7 @@ async def test_async_eth_replace_transaction_gas_price_defaulting_minimum(
2258
2261
gas_price * 1.125
2259
2262
) # minimum gas price
2260
2263
2264
+ @flaky (max_runs = 3 )
2261
2265
@pytest .mark .asyncio
2262
2266
async def test_async_eth_replace_transaction_gas_price_defaulting_strategy_higher (
2263
2267
self , async_w3 : "AsyncWeb3" , async_unlocked_account : ChecksumAddress
@@ -2286,6 +2290,7 @@ def higher_gas_price_strategy(async_w3: "AsyncWeb3", txn: TxParams) -> Wei:
2286
2290
) # Strategy provides higher gas price
2287
2291
async_w3 .eth .set_gas_price_strategy (None ) # reset strategy
2288
2292
2293
+ @flaky (max_runs = 3 )
2289
2294
@pytest .mark .asyncio
2290
2295
async def test_async_eth_replace_transaction_gas_price_defaulting_strategy_lower (
2291
2296
self , async_w3 : "AsyncWeb3" , async_unlocked_account : ChecksumAddress
@@ -2335,7 +2340,6 @@ async def test_async_eth_new_block_filter(self, async_w3: "AsyncWeb3") -> None:
2335
2340
2336
2341
changes = await async_w3 .eth .get_filter_changes (filter .filter_id )
2337
2342
assert is_list_like (changes )
2338
- assert not changes
2339
2343
2340
2344
result = await async_w3 .eth .uninstall_filter (filter .filter_id )
2341
2345
assert result is True
@@ -2999,6 +3003,7 @@ def test_eth_send_transaction(
2999
3003
assert txn ["maxPriorityFeePerGas" ] == txn_params ["maxPriorityFeePerGas" ]
3000
3004
assert txn ["gasPrice" ] == txn_params ["maxFeePerGas" ]
3001
3005
3006
+ @flaky (max_runs = 3 )
3002
3007
def test_eth_send_transaction_with_nonce (
3003
3008
self , w3 : "Web3" , unlocked_account : ChecksumAddress
3004
3009
) -> None :
@@ -3260,6 +3265,7 @@ def gas_price_strategy(_w3: "Web3", _txn: TxParams) -> str:
3260
3265
assert txn ["gasPrice" ] == two_gwei_in_wei
3261
3266
w3 .eth .set_gas_price_strategy (None ) # reset strategy
3262
3267
3268
+ @flaky (max_runs = 3 )
3263
3269
def test_eth_replace_transaction_legacy (
3264
3270
self , w3 : "Web3" , unlocked_account_dual_type : ChecksumAddress
3265
3271
) -> None :
@@ -3288,7 +3294,7 @@ def test_eth_replace_transaction_legacy(
3288
3294
assert replace_txn ["gas" ] == 21000
3289
3295
assert replace_txn ["gasPrice" ] == txn_params ["gasPrice" ]
3290
3296
3291
- @flaky (max_runs = 5 )
3297
+ @flaky (max_runs = 3 )
3292
3298
def test_eth_replace_transaction (
3293
3299
self , w3 : "Web3" , unlocked_account_dual_type : ChecksumAddress
3294
3300
) -> None :
@@ -3416,6 +3422,7 @@ def test_eth_replace_transaction_gas_price_too_low(
3416
3422
with pytest .raises (ValueError ):
3417
3423
w3 .eth .replace_transaction (txn_hash , txn_params )
3418
3424
3425
+ @flaky (max_runs = 3 )
3419
3426
def test_eth_replace_transaction_gas_price_defaulting_minimum (
3420
3427
self , w3 : "Web3" , unlocked_account : ChecksumAddress
3421
3428
) -> None :
@@ -3438,6 +3445,7 @@ def test_eth_replace_transaction_gas_price_defaulting_minimum(
3438
3445
gas_price * 1.125
3439
3446
) # minimum gas price
3440
3447
3448
+ @flaky (max_runs = 3 )
3441
3449
def test_eth_replace_transaction_gas_price_defaulting_strategy_higher (
3442
3450
self , w3 : "Web3" , unlocked_account : ChecksumAddress
3443
3451
) -> None :
@@ -3465,6 +3473,7 @@ def higher_gas_price_strategy(w3: "Web3", txn: TxParams) -> Wei:
3465
3473
) # Strategy provides higher gas price
3466
3474
w3 .eth .set_gas_price_strategy (None ) # reset strategy
3467
3475
3476
+ @flaky (max_runs = 3 )
3468
3477
def test_eth_replace_transaction_gas_price_defaulting_strategy_lower (
3469
3478
self , w3 : "Web3" , unlocked_account : ChecksumAddress
3470
3479
) -> None :
@@ -3491,6 +3500,7 @@ def lower_gas_price_strategy(w3: "Web3", txn: TxParams) -> Wei:
3491
3500
assert replace_txn ["gasPrice" ] == math .ceil (gas_price * 1.125 )
3492
3501
w3 .eth .set_gas_price_strategy (None ) # reset strategy
3493
3502
3503
+ @flaky (max_runs = 3 )
3494
3504
def test_eth_modify_transaction_legacy (
3495
3505
self , w3 : "Web3" , unlocked_account : ChecksumAddress
3496
3506
) -> None :
@@ -3520,6 +3530,7 @@ def test_eth_modify_transaction_legacy(
3520
3530
assert modified_txn ["gas" ] == 21000
3521
3531
assert modified_txn ["gasPrice" ] == cast (int , txn_params ["gasPrice" ]) * 2
3522
3532
3533
+ @flaky (max_runs = 3 )
3523
3534
def test_eth_modify_transaction (
3524
3535
self , w3 : "Web3" , unlocked_account : ChecksumAddress
3525
3536
) -> None :
0 commit comments