Commit 7882a61
committed
fix(test): make reorg-based mineEmptyBlock advance L1 time
The v5 mineEmptyBlock rewrite (gas-limit + anvil_reorg, mempool-safe) froze L1
time: anvil stamps a reorg's replacement blocks as parent+N*interval, resetting
the wall-clock advance that the mine step produced. next's gas_price_ladder test
(added after the v5 fork) drives L1 time forward via mineEmptyBlock and asserts
L1TxUtils' stall/timeout ladder; with time frozen, timePassed stays 0, the tx
never times out, and the test hits Jest's 40s wall. Neither public line had both
the new impl and this test, so the collision only surfaced in the forward-port.
Reproduce the wall-clock advance (>=1s per block) through a temporary
block-timestamp interval during the reorg, then restore any pre-existing interval
(read as pending-latest, since anvil exposes no getter) so deploy-set slot
spacing is preserved.
Verified: gas_price_ladder 1/1 (was 40s timeout), eth_cheat_codes 22/22,
l1_tx_utils 51/51.1 parent f50abe3 commit 7882a61
1 file changed
Lines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
508 | 514 | | |
509 | 515 | | |
510 | 516 | | |
511 | 517 | | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
512 | 522 | | |
513 | 523 | | |
514 | 524 | | |
515 | 525 | | |
516 | 526 | | |
517 | 527 | | |
| 528 | + | |
| 529 | + | |
518 | 530 | | |
519 | | - | |
520 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
521 | 542 | | |
522 | 543 | | |
523 | 544 | | |
| |||
0 commit comments