63
63
)
64
64
from web3 ._utils .module_testing .utils import (
65
65
RequestMocker ,
66
+ flaky_geth_dev_mining ,
66
67
)
67
68
from web3 ._utils .type_conversion import (
68
69
to_hex_if_bytes ,
@@ -2070,6 +2071,7 @@ async def test_async_eth_sign_ens_names(
2070
2071
assert is_bytes (signature )
2071
2072
assert len (signature ) == 32 + 32 + 1
2072
2073
2074
+ @flaky_geth_dev_mining
2073
2075
@pytest .mark .asyncio
2074
2076
async def test_async_eth_replace_transaction_legacy (
2075
2077
self , async_w3 : "AsyncWeb3" , async_unlocked_account_dual_type : ChecksumAddress
@@ -2097,6 +2099,7 @@ async def test_async_eth_replace_transaction_legacy(
2097
2099
assert replace_txn ["gas" ] == 21000
2098
2100
assert replace_txn ["gasPrice" ] == txn_params ["gasPrice" ]
2099
2101
2102
+ @flaky_geth_dev_mining
2100
2103
@pytest .mark .asyncio
2101
2104
async def test_async_eth_replace_transaction (
2102
2105
self , async_w3 : "AsyncWeb3" , async_unlocked_account_dual_type : ChecksumAddress
@@ -2131,6 +2134,7 @@ async def test_async_eth_replace_transaction(
2131
2134
assert replace_txn ["maxFeePerGas" ] == three_gwei_in_wei
2132
2135
assert replace_txn ["maxPriorityFeePerGas" ] == two_gwei_in_wei
2133
2136
2137
+ @flaky_geth_dev_mining
2134
2138
@pytest .mark .asyncio
2135
2139
async def test_async_eth_replace_transaction_underpriced (
2136
2140
self , async_w3 : "AsyncWeb3" , async_unlocked_account_dual_type : ChecksumAddress
@@ -2152,6 +2156,7 @@ async def test_async_eth_replace_transaction_underpriced(
2152
2156
with pytest .raises (ValueError , match = "replacement transaction underpriced" ):
2153
2157
await async_w3 .eth .replace_transaction (txn_hash , txn_params )
2154
2158
2159
+ @flaky_geth_dev_mining
2155
2160
@pytest .mark .asyncio
2156
2161
async def test_async_eth_replace_transaction_non_existing_transaction (
2157
2162
self , async_w3 : "AsyncWeb3" , async_unlocked_account_dual_type : ChecksumAddress
@@ -2172,6 +2177,7 @@ async def test_async_eth_replace_transaction_non_existing_transaction(
2172
2177
txn_params ,
2173
2178
)
2174
2179
2180
+ @flaky_geth_dev_mining
2175
2181
@pytest .mark .asyncio
2176
2182
async def test_async_eth_replace_transaction_already_mined (
2177
2183
self , async_w3 : "AsyncWeb3" , async_unlocked_account_dual_type : ChecksumAddress
@@ -2192,6 +2198,7 @@ async def test_async_eth_replace_transaction_already_mined(
2192
2198
with pytest .raises (ValueError , match = "Supplied transaction with hash" ):
2193
2199
await async_w3 .eth .replace_transaction (txn_hash , txn_params )
2194
2200
2201
+ @flaky_geth_dev_mining
2195
2202
@pytest .mark .asyncio
2196
2203
async def test_async_eth_replace_transaction_incorrect_nonce (
2197
2204
self , async_w3 : "AsyncWeb3" , async_unlocked_account : ChecksumAddress
@@ -2213,6 +2220,7 @@ async def test_async_eth_replace_transaction_incorrect_nonce(
2213
2220
with pytest .raises (ValueError ):
2214
2221
await async_w3 .eth .replace_transaction (txn_hash , txn_params )
2215
2222
2223
+ @flaky_geth_dev_mining
2216
2224
@pytest .mark .asyncio
2217
2225
async def test_async_eth_replace_transaction_gas_price_too_low (
2218
2226
self , async_w3 : "AsyncWeb3" , async_unlocked_account_dual_type : ChecksumAddress
@@ -2230,6 +2238,7 @@ async def test_async_eth_replace_transaction_gas_price_too_low(
2230
2238
with pytest .raises (ValueError ):
2231
2239
await async_w3 .eth .replace_transaction (txn_hash , txn_params )
2232
2240
2241
+ @flaky_geth_dev_mining
2233
2242
@pytest .mark .asyncio
2234
2243
async def test_async_eth_replace_transaction_gas_price_defaulting_minimum (
2235
2244
self , async_w3 : "AsyncWeb3" , async_unlocked_account : ChecksumAddress
@@ -2253,6 +2262,7 @@ async def test_async_eth_replace_transaction_gas_price_defaulting_minimum(
2253
2262
gas_price * 1.125
2254
2263
) # minimum gas price
2255
2264
2265
+ @flaky_geth_dev_mining
2256
2266
@pytest .mark .asyncio
2257
2267
async def test_async_eth_replace_transaction_gas_price_defaulting_strategy_higher (
2258
2268
self , async_w3 : "AsyncWeb3" , async_unlocked_account : ChecksumAddress
@@ -2281,6 +2291,7 @@ def higher_gas_price_strategy(async_w3: "AsyncWeb3", txn: TxParams) -> Wei:
2281
2291
) # Strategy provides higher gas price
2282
2292
async_w3 .eth .set_gas_price_strategy (None ) # reset strategy
2283
2293
2294
+ @flaky_geth_dev_mining
2284
2295
@pytest .mark .asyncio
2285
2296
async def test_async_eth_replace_transaction_gas_price_defaulting_strategy_lower (
2286
2297
self , async_w3 : "AsyncWeb3" , async_unlocked_account : ChecksumAddress
@@ -3254,6 +3265,7 @@ def gas_price_strategy(_w3: "Web3", _txn: TxParams) -> str:
3254
3265
assert txn ["gasPrice" ] == two_gwei_in_wei
3255
3266
w3 .eth .set_gas_price_strategy (None ) # reset strategy
3256
3267
3268
+ @flaky_geth_dev_mining
3257
3269
def test_eth_replace_transaction_legacy (
3258
3270
self , w3 : "Web3" , unlocked_account_dual_type : ChecksumAddress
3259
3271
) -> None :
@@ -3282,6 +3294,7 @@ def test_eth_replace_transaction_legacy(
3282
3294
assert replace_txn ["gas" ] == 21000
3283
3295
assert replace_txn ["gasPrice" ] == txn_params ["gasPrice" ]
3284
3296
3297
+ @flaky_geth_dev_mining
3285
3298
def test_eth_replace_transaction (
3286
3299
self , w3 : "Web3" , unlocked_account_dual_type : ChecksumAddress
3287
3300
) -> None :
@@ -3315,6 +3328,7 @@ def test_eth_replace_transaction(
3315
3328
assert replace_txn ["maxFeePerGas" ] == three_gwei_in_wei
3316
3329
assert replace_txn ["maxPriorityFeePerGas" ] == two_gwei_in_wei
3317
3330
3331
+ @flaky_geth_dev_mining
3318
3332
def test_eth_replace_transaction_underpriced (
3319
3333
self , w3 : "Web3" , unlocked_account_dual_type : ChecksumAddress
3320
3334
) -> None :
@@ -3335,6 +3349,7 @@ def test_eth_replace_transaction_underpriced(
3335
3349
with pytest .raises (ValueError , match = "replacement transaction underpriced" ):
3336
3350
w3 .eth .replace_transaction (txn_hash , txn_params )
3337
3351
3352
+ @flaky_geth_dev_mining
3338
3353
def test_eth_replace_transaction_non_existing_transaction (
3339
3354
self , w3 : "Web3" , unlocked_account_dual_type : ChecksumAddress
3340
3355
) -> None :
@@ -3354,6 +3369,7 @@ def test_eth_replace_transaction_non_existing_transaction(
3354
3369
txn_params ,
3355
3370
)
3356
3371
3372
+ @flaky_geth_dev_mining
3357
3373
def test_eth_replace_transaction_already_mined (
3358
3374
self , w3 : "Web3" , unlocked_account_dual_type : ChecksumAddress
3359
3375
) -> None :
@@ -3373,6 +3389,7 @@ def test_eth_replace_transaction_already_mined(
3373
3389
with pytest .raises (ValueError , match = "Supplied transaction with hash" ):
3374
3390
w3 .eth .replace_transaction (txn_hash , txn_params )
3375
3391
3392
+ @flaky_geth_dev_mining
3376
3393
def test_eth_replace_transaction_incorrect_nonce (
3377
3394
self , w3 : "Web3" , unlocked_account : ChecksumAddress
3378
3395
) -> None :
@@ -3393,6 +3410,7 @@ def test_eth_replace_transaction_incorrect_nonce(
3393
3410
with pytest .raises (ValueError ):
3394
3411
w3 .eth .replace_transaction (txn_hash , txn_params )
3395
3412
3413
+ @flaky_geth_dev_mining
3396
3414
def test_eth_replace_transaction_gas_price_too_low (
3397
3415
self , w3 : "Web3" , unlocked_account_dual_type : ChecksumAddress
3398
3416
) -> None :
@@ -3409,6 +3427,7 @@ def test_eth_replace_transaction_gas_price_too_low(
3409
3427
with pytest .raises (ValueError ):
3410
3428
w3 .eth .replace_transaction (txn_hash , txn_params )
3411
3429
3430
+ @flaky_geth_dev_mining
3412
3431
def test_eth_replace_transaction_gas_price_defaulting_minimum (
3413
3432
self , w3 : "Web3" , unlocked_account : ChecksumAddress
3414
3433
) -> None :
@@ -3431,6 +3450,7 @@ def test_eth_replace_transaction_gas_price_defaulting_minimum(
3431
3450
gas_price * 1.125
3432
3451
) # minimum gas price
3433
3452
3453
+ @flaky_geth_dev_mining
3434
3454
def test_eth_replace_transaction_gas_price_defaulting_strategy_higher (
3435
3455
self , w3 : "Web3" , unlocked_account : ChecksumAddress
3436
3456
) -> None :
@@ -3458,6 +3478,7 @@ def higher_gas_price_strategy(w3: "Web3", txn: TxParams) -> Wei:
3458
3478
) # Strategy provides higher gas price
3459
3479
w3 .eth .set_gas_price_strategy (None ) # reset strategy
3460
3480
3481
+ @flaky_geth_dev_mining
3461
3482
def test_eth_replace_transaction_gas_price_defaulting_strategy_lower (
3462
3483
self , w3 : "Web3" , unlocked_account : ChecksumAddress
3463
3484
) -> None :
0 commit comments